Solved

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

Posted on 2003-12-08
4
799 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 250 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Open a link in vb.net 2 26
Please explain purpose of GZIP 4 59
MYSQL responding very slow 3 50
Adding items to a C# list incrementally 5 62
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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