Link to home
Start Free TrialLog in
Avatar of Steve Sirica
Steve SiricaFlag for United States of America

asked on

Getting the SelectedIndex of a IEWC:TABSTRIP in client Javascript?

I know I'm sort of on the right track, but I just can't quite seems to get there.  I would like to find the current value of the SelectedIndex of an IEWC:TABSTRIP control.  Let's say I have something like the following:
<IEWC:TABSTRIP ID="tsTabs" RUNAT="server" TARGETID="mpTabs">
      <IEWC:TAB TEXT="Tab 1" ID="tab1" TARGETID="pv1"></IEWC:TAB>
      <IEWC:TAB TEXT="Tab 2" ID="tab2" TARGETID="pv2"></IEWC:TAB>
      <IEWC:TAB TEXT="Tab 3" ID="tab3" TARGETID="pv3"></IEWC:TAB>
</IEWC:TABSTRIP>
<IEWC:MULTIPAGE ID="mpTabs" RUNAT="server">
      <IEWC:PAGEVIEW ID="pv1" ALIGN="center">
      </IEWC:PAGEVIEW>
      <IEWC:PAGEVIEW ID="pv2" ALIGN="center">
      </IEWC:PAGEVIEW>
      <IEWC:PAGEVIEW ID="pv3" ALIGN="center">
      </IEWC:PAGEVIEW>
</IEWC:MULTIPAGE>

In client Javascript I would like to get which tab is the current tab?  I figured something like the following would work...I was wrong.
alert(document.Form1.elements("tsSvcs").SelectedIndex);
alert(document.Form1.elements("mpTabs").SelectedIndex);

Let's not concern ourself with why I'm doing this, or why aren't I doing this in server code.  Let's just solve the problem at hand.  If it's at all possible?

Thanks
Steve
Avatar of Steve Sirica
Steve Sirica
Flag of United States of America image

ASKER

figured it out:
var xxx = document.getElementById("mpSvcs");
alert(xxx.selectedIndex);

anyone who answers with the above will get the points.
ASKER CERTIFIED SOLUTION
Avatar of Dabas
Dabas
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Had to be the easiest point you've ever made.

Have a good one.
Steve
SSirica,
It certainly was!!!
Thanks, LOL!

Dabas