?
Solved

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

Posted on 2003-12-08
4
Medium Priority
?
807 Views
Last Modified: 2007-12-19
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
0
Comment
Question by:Steve Sirica
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Author Comment

by:Steve Sirica
ID: 9899051
figured it out:
var xxx = document.getElementById("mpSvcs");
alert(xxx.selectedIndex);

anyone who answers with the above will get the points.
0
 
LVL 27

Accepted Solution

by:
Dabas earned 1000 total points
ID: 9899294
Hi SSirica:
 var xxx = document.getElementById("mpSvcs");
 alert(xxx.selectedIndex);

Answering with the above....

Dabas
0
 
LVL 4

Author Comment

by:Steve Sirica
ID: 9899483
Had to be the easiest point you've ever made.

Have a good one.
Steve
0
 
LVL 27

Expert Comment

by:Dabas
ID: 9900070
SSirica,
It certainly was!!!
Thanks, LOL!

Dabas
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question