Monday, March 26, 2012

Catch the active tab changed event in javascript

Hi,

I have been using the ajax tab control.

I need to catch the activetab changed event of javascript.

I want to do some processing when the users goes to a specific tab.

It would be very helpful if someone can tell me how i can do it.

Cheers

Sohail

Hi,

Well looks like i got how to catch the activetab changed event

the tab container has OnClientActiveTabChanged event.

However i still need to get some way to acces the active index in the javascript so based on it i can do some processing.

Please let me know the soltn

Cheers

Sohail Sayed


Hi Sohail,

You can use the following script to get the index of active tab:


var tc = $find("TabContainer1"); // "TabContainer1" is the client id of the TabContainer control.

var index = tc.get_activeTabIndex();

Hope this helps.


Hi,

Thx i am now able to get the active index

No comments:

Post a Comment