My javascript is rusty, so forgive the syntax errors:
// A global variable to hold the currently active tab
var activeTab;
window.uicontrols.createTabBarItem("tab2", "Tab 2", "icon2.png", {
onSelect: function() {
myName = "#tab2"
if (activeTab != myName)
{
jQT.goTo(myName, "slide");
activeTab = myName;
}
}
});
Or if you can modify the function "jQT.goTo", you could put this logic there to prevent going to a place multiple times
To prevent the tab from being clicked, you could set the "disabled" attribute on it, or come up with some other visual cue that clicking on it won't do anything
RyanHennig
2010-10-15 03:46:48