PDA

View Full Version : Drop Down Menu instead of Tabs (Tab Content Script)



konstance
01-26-2006, 07:15 PM
I am trying to modify this script http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm to where the "tabs" at the top are actually contained in the Drop Down Menu. So, when I click down in the menu and change to the second choice, that's when the content will switch.

Is that at all possible?

Here's what I replaced the original content (between the <UL> tags) with:


<select id="tablist" name="">
<option class="current" selected onChange="return expandcontent('sc1', this)" value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option onChange="return expandcontent('sc2', this)" value="new.html">What's New</option>
<option onChange="return expandcontent('sc3', this)" value="new.html">What's Hot</option>
<option onChange="return expandcontent('sc4', this)" value="new.html">Search</option>
</select>

konstance
01-26-2006, 07:36 PM
Nevermind... I just figured it out.

the right script is this (in case anyone is interested):


<select id="tablist" name="test" size="1" onChange="return expandcontent(this.value, this)">
<option selected value="sc1">Dynamic Drive</option>
<option value="sc2" theme="#EAEAFF">What's New</option>
<option value="sc3" theme="#EAEAFF">What's Hot</option>
<option value="sc4" theme="#EAEAFF">Search</option>
</select>