If the link to specify which tab to be selected is on another page, you can't just do:
Code:
<p><b><a href="javascript: expandtab('maintab', 3)">Click here to select 4th tab</a></b></p>
Instead, you need to pass some info via the URL to the target page containing the tab content to tell it which tab to be selected. You can do this with a link similar to:
Code:
<p><b><a href="target.htm?selectedtab=3">To to target page and select 4th tab within tab content</a></b></p>
The "3" here indicates you wish the 4th tab to be selected. Then on the target page containing the tab content, after initializing it, add the below code in red:
Code:
<script type="text/javascript">
//Start Tab Content script for UL with id="maintab" Separate multiple ids each with a comma.
initializetabcontent("maintab")
var param=window.location.href.match(/selectedtab=(\d+)/i)
if (RegExp.$1!="")
expandtab('maintab', RegExp.$1)
</script>
This will cause the 4th tab to be selected whenever users visit target.htm via the mentioned link on another page.
Bookmarks