It's possible, but how complex the solution turns out to be really depends on exactly the "conditions" in which the other tabs are selected. As is you say:
I need to disable all other tabs within the Tab Content Script based on specific conditions.
The problem with this logic is that by disabling all other tabs, it also means the user is now locked into the lone tab that isn't disabled. What other conditions are there to revive the other tabs again?
Speaking in generalities, when a user clicks on a tab, you can in turn do something with one or more of its peer tabs by doing something like:
Code:
<ul id="countrytabs" class="shadetabs">
<li><a href="#" rel="country1" class="selected">Tab 1</a></li>
<li onClick="countries.tabs[0].style.color='gray'"><a href="#" rel="country2">Tab 2</a></li>
<li><a href="#" rel="country3">Tab 3</a></li>
<li><a href="#" rel="country4">Tab 4</a></li>
<li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>
</ul>
In the above example, clicking on the second tab will cause the first tab's text to turn gray. The code:
is an array, where "countries" is simply the variable you created when initializing this tab content instance (ie: var countries=new ddtabcontent("countrytabs")), and 0 means access the first tab within all the tab links of this instance. Make sure onClick is added to the <LI> of each tab, and not <A>, as that element already has an onClick event assigned dynamically by the script.
Bookmarks