PDA

View Full Version : Tab Content Script



roninhockley
08-13-2005, 08:56 PM
Site newbie here.

http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

I saw this script and realized it is exactly what i want for a web app i'm working on. The code is making it want to go to another page though, and I am very confused about that! I thought this script was designed NOT to have to do that? :confused:


<li><a href="http://www.dynamicdrive.com" class="current" onClick="return expandcontent('sc1', this)">Dynamic Drive</a></li>
<li><a href="new.htm" onClick="return expandcontent('sc2', this)" theme="#EAEAFF">What's New</a></li>
<li><a href="hot.htm" onClick="return expandcontent('sc3', this)" theme="#FFE6E6">What's Hot</a></li>
<li><a href="search.htm" onClick="return expandcontent('sc4', this)" theme="#DFFFDF">Search</a></li>

How do I alter these lines so that it ONLY displays sc1, sc2, etc and not trying to go to new.htm, hot.htm, etc?

thanks for any help.

jscheuer1
08-14-2005, 04:31 PM
The demo does exactly that in my Mozilla and IE browsers. Are you having trouble with the demo or with your own version?

roninhockley
08-15-2005, 03:33 PM
Demo works fine for me too, just my own version doing this. I changed the anchor tag in the ul's from an href to an onclick...it fixed it except that it now isn't an underlined hyperlink.

But i'm still really puzzled why it was built with an href pointing to another page in the first place. I mean it works great on here, but why point to a dead page?

Before I rant any further, this site is a great find...i'm not complaining!! I'd be a dead duck without the likes of those who run this site.

jscheuer1
08-16-2005, 09:18 AM
I think I need to see the code as you have it written, or want it written, at least for that part of it. Something like:

<a href="javascript:void(0)" onClick="return expandcontent('sc2', this)" theme="#EAEAFF">What's New</a>should work though.