PDA

View Full Version : About Tab Content Script



brazza
09-02-2005, 04:04 AM
Script : Tab Content Script
http://www.dynamicdrive.com/dynamic.../tabcontent.htm

This script work if you use one content tab.

I wants to know how to make to make function script with several tabs like:

Tab1 : Popular News - odd News - Search

Tab2: New Archives - Old Archives.
etc...

The problem is this script use one unique tablist ID.

Thanks,

brazza
09-02-2005, 08:50 AM
complement info:
The code HTML of the script is following form:

<ul id="tablist">
<li><a href="http://www.dynamicdrive.com" class="current" onClick="return expandcontent('sc1', this)">Dynamic Drive</a></li>
...
</ul>

<DIV id="tabcontentcontainer">

<div id="sc1" class="tabcontent">Visit Dynamic Drive for free, award winning DHTML scripts for your site:<br /></div>
...
</DIV>

If I add another tab content like
<ul id="tablist">
<li><a href="http://www.dynamicdrive.com" class="current" onClick="return expandcontent('sc1', this)">Archives News</a></li>
...
</ul>

<DIV id="tabcontentcontainer">

<div id="sc1" class="tabcontent">Visit Dynamic Drive for free, award winning DHTML scripts for your site:<br /></div>
...
</DIV>

I have an error because the values of the tablist and tabcontentcontainer IDs must be unique.
How to make make to modify operation of it, or to give this IDs like parameters?

Thanks,