This is a migrated thread and some comments may be shown as answers.

[Solved] How to execute two js functions for one Rad control's client event

2 Answers 375 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Anshul
Top achievements
Rank 1
Anshul asked on 25 Jun 2008, 06:12 PM
Hi,

I am trying to execute two separate javascript functions from a single Rad control client event.

If I was using a regular asp control like a GridView I could do something like:

<asp:GridView1 id="Grid1" runat="server"
onMouseOver="JsFunction1();JsFunction2();">

But looks like the same syntax doesn't work in  Rad controls for calling two JsFunctions.

I basically want to call two javascript functions on RadTabStrip's OnClientTabSelected event 

Any help would be appreciated.

Thank you.

2 Answers, 1 is accepted

Sort by
0
Accepted
Kevin Babcock
Top achievements
Rank 1
answered on 25 Jun 2008, 06:52 PM
Hello Anshul,

Have you tried setting the OnClientTabSelected event to a client-side method which calls the two methods you want?

Try this:

function ClientTabSelected(sender, eventArgs) { 
    Function1(sender, eventArgs); 
    Function2(sender, eventArgs); 
 
function Function1(sender, eventArgs) { 
    // do something... 
 
function Function2(sender, eventArgs) { 
    // do something else... 

I hope this was helpful. If you need further assistance, please let me know.

Regards,
Kevin Babcock
0
Anshul
Top achievements
Rank 1
answered on 25 Jun 2008, 07:23 PM
Hi Kevin,

Yup, that did the trick.

Thanks,
Anshul.
Tags
General Discussions
Asked by
Anshul
Top achievements
Rank 1
Answers by
Kevin Babcock
Top achievements
Rank 1
Anshul
Top achievements
Rank 1
Share this question
or