WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 TabPane > Preselecting?, ForgetFoo, March 3, 2004
     Re:TabPane > Preselecting?, Emil A Eklund, March 3, 2004
         Re:TabPane > Preselecting? , Guillermo, March 10, 2004
             Re:TabPane > Preselecting? , Erik Arvidsson, March 14, 2004
         Re:TabPane > Preselecting?, Erik Arvidsson, March 4, 2004
         Re:TabPane > Preselecting?, ForgetFoo, March 3, 2004
             Re:TabPane > Preselecting?, Emil A Eklund, March 4, 2004

Subject: Re:TabPane > Preselecting? From: Emil A Eklund Date: March 4, 2004
Yeah, been a while...

Good luck with the new layout, let us know when it's up!

/Emil
--------------------------------------------------------


hey emil! how ya doing, man?! been awhile, huh? :)
i started to mess around with an alternate design/style for my FooComments and it hit me upside the head late lastnight - why not give the Tabpane a spin? i luv the script and have wanted to use it somewhere for quite a long time now... heh
that's awesome! didnt even think of using 'setSelectedIndex', that's great... i'll give it a spin and see if i can't get it working here.
thanks buddy! ;)
/foo


From: Emil A Eklund
Sent: March 3, 2004
Subject: Re:TabPane > Preselecting?

Hey foo, how are you doing?

I doubt you can specify which tab should be selected when the tabstrip is created, however as soon as it has the setSelectedIndex method can be used to change the selection.

Assuming you just want to pass the tab index, and nothing else, the following code be used:

var str = document.location.search;
var index = str.substring(1, str.length-1);
tp1.setSelectedIndex(document.location.search);

so file.ext?3 would select the 4th tab (zero-index)

/Emil
---------------------------------------------------------

quick question:
i have a page with 2 tabs defined, and if i pass in a server-side variable i'd like to "preselect" a tab? i have them setup with the js calls like:
<script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage2" ) );</script>
so if i pass in a value via a hidden form input or threw the URL, i'd like to "select" this tab... know what i mean?
thanks man, appreciate it! :)
/foo
http://www.forgetfoo.com/






Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX