Message Thread: |
View All MessagesBack to WebFX |
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/ |