:: Forum >>

Help...?

I would like to change the current tab from a seperate link...

I've tried many ways to change the tabs, finding the obj by id
document.getElementById("myTabs").setSelectedItems([2]);
document.getElementById("myTabs").setTabIndex(2);

public var that was the object "myTabs"
myTabs.setSelectedItems([2]);
myTabs.setTabIndex(2);

Plus a ton of other things, can't get it to change the current tab... Any Ideas?

And is there an event fired when the grid population is complete?
Brian
Monday, July 17, 2006
You need to use myTabs.onSelectedItemsChanged
Check this Sample
HTH
<script>

var itemTextArray = ["Home", "Favorites", "Font size", "Search"];

var myTabs = new AW.UI.Tabs;
myTabs.setId("tabs1");
myTabs.setItemText(itemTextArray);
myTabs.setItemCount(4);
myTabs.setSelectedItems([0]);
    
myTabs.onSelectedItemsChanged = function(index){ alert (index) }
document.write(myTabs);

var button = new AW.UI.Button;
button.setId("button1");
button.setControlText("Button");
button.setControlImage("favorites");
button.onClick = function(){ myTabs.setSelectedItems([0]); }
    
document.write(button);

</script>
Carlos
Monday, July 17, 2006

This topic is archived.


Back to support forum

Forum search