PDA

View Full Version : DD Tab Menu Script - Submenu default tab



jessaustin
04-17-2009, 06:12 PM
1) Script Title: DD Tab Menu Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm

3) Describe problem: I am using an older version of this script, but I will try to explain the best I can. I am using the script to display a different submenu (horizontal) for each tab. I can't figure out how to make the second tab automatically display the contents of the first tab. Here is example code for the first tab which works fine:


<ul id="tablist">
<li></li>
<li><a href="javascript:void(null)" onClick="showtabcontent('first', this)">&nbsp;Motion Computing Tablets&nbsp;</a></li>
<li><a href="javascript:void(null)" onClick="showtabcontent('second', this)">&nbsp;Dell Lattitude Tablets&nbsp;</a></li>
<li><a href="javascript:void(null)" onClick="showtabcontent('third', this)">&nbsp;Tablet FAQs&nbsp;</a></li>
<li><a href="javascript:void(null)" onClick="showtabcontent('fourth', this)">&nbsp;Resources&nbsp;</a></li>
</ul>

<div id="tabcontentcontainer">
<div id="first" class="tabcontent">
<DIV id="panelchoices">
<UL style="MARGIN-BOTTOM: 0px">
<LI><A onMouseOver="expandcontent('sc1', this); "href="#">The Basics</A></Li>
<LI><A onMouseOver="expandcontent('sc2', this); "href="#">Tablet PC Care</A></LI>

<LI><A onMouseOver="expandcontent('sc3', this); "
href="#">Getting to Work!</A></LI>
<LI><A onMouseOver="expandcontent('sc4', this); "
href="#">Tablet PC - Mobile</A></LI>
<LI><A onMouseOver="expandcontent('sc5', this); "
href="#">Applications</A></LI>
</UL>
</DIV>

Now for the second tab:


<div id="second" class="tabcontent">
<DIV id="panelchoices">
<UL style="MARGIN-BOTTOM: 0px">
<LI><A onMouseOver="expandcontent('sc6', this); "href="#">Tablet Tipsheet</A></Li>
<LI><A onMouseOver="expandcontent('sc7', this); "href="#">Tablet PC Care</A></LI>

<LI><A onMouseOver="expandcontent('sc8', this); "
href="#">Getting to Work!</A></LI>
<LI><A onMouseOver="expandcontent('sc9', this); "
href="#">Tablet PC - Mobile</A></LI>
<LI><A onMouseOver="expandcontent('sc10', this); "
href="#">Applications</A></LI>
</UL>
</DIV>

I want the content of 'sc6' to be the default when "second" is clicked. Is there a way to do this?

jessaustin
04-20-2009, 02:31 PM
Any suggestions? Am I explaining the issue correctly? Any help would be greatly appreciated.

ddadmin
04-20-2009, 07:56 PM
Hmm not sure I understand what you're trying to accomplish actually. It would help to post a test page, since you're referring to an "older" version of the script as well.