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

OnSelect only fired once when tab content loaded?

1 Answer 56 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
AilWeb
Top achievements
Rank 1
AilWeb asked on 07 Sep 2012, 12:56 PM
I have a tabstrip with 5 tabs.  Each loads its content fine.  However, now I want to keep track of which tab is currently selected.  Im trying to write to a hidden variable using the OnSelect  event.  However, this only seems to fire off once, when the tab is first selected.  After all the tabs have been clicked at least once, this event never fires again.  Isn't this supposed to be a client-side event and as such should fire on each time the tab is selected?

Ok, now that Ive posted this...I see my mistake.  Its working as expected.  Now I just need to figure out how to get the selected index of the tab i selected.
e.item.tabIndex isnt working and the docs aren't much help either.

I have a client side breakpoint set and looking at the locals window to view the object hierarchy.  

1 Answer, 1 is accepted

Sort by
0
AilWeb
Top achievements
Rank 1
answered on 07 Sep 2012, 01:20 PM
Im referring to this thread, but  doesnt work and I dont see "index" listed in the available methods in the locals window either.

Ok, now im looking at this example, but the class selector doesn't seem to work with IE8

I think my solution is to grab the text on the tab with this
e.item.innerText, but I would rather have the index

Tags
TabStrip
Asked by
AilWeb
Top achievements
Rank 1
Answers by
AilWeb
Top achievements
Rank 1
Share this question
or