View Full Version : Link for drop-downing sublinks...


yuen
07-19-2003, 05:45 PM
Alright, a while back I made this webpage where I made a text link...

When you click on it another list of text sublinks that were hidden on the same page would drop down from that text link...

I could even customize the speed of the dropdown I think...

I did this such a long time ago that I can't remember how I did it... though I do remember it... I believe there was a fairly simple code involved.

Any help for this code is appreciated!

*Just note I can't remember if it was done completely in HTML or not. But if I can do this with just HTML alone, that would be great as well.

Lissa
07-19-2003, 05:57 PM
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

yuen
07-19-2003, 08:07 PM
Hmm.. thanks for the link, but sorry, that wasn't the one I was looking for... uh...how do I explain this...

It was more like a simple code that you can use to 'hide' things (links, images, anything that can go on a webpage) and when you click on the link it can summon the hidden part and everything can be seen then.

starlet
07-19-2003, 11:56 PM
show/hide div?

in the head section

<script language=javascript>
var state = 'hidden';

function showhide(layer_ref) {

if (state == 'visible') {
state = 'hidden';
}
else {
state = 'visible';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
}
if (document.getElementById && !document.all) {
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.visibility = state;
}
}
//
</script>

Where you want the link to appear

<div style="position: absolute; top: 70px; width: 75px; left: 400px;" align=left id=splashstuff> <a href="javascript:// "onclick="showhide('agent99');"> Click this </a> </div>

where you want the hidden content to appear...

<div style="position:absolute; top:150px; left:0px; width: 400px;
visibility:hidden;" id=agent99>

content </div>

I just copied that code right off my own site, so obviously (assuming its what you are looking for) all the info will need editing to suit your needs.

yuen
07-20-2003, 02:18 AM
Oh I just checked out your site, and that seems like the closest thing I'm searching for, and it's so simple too. Thank you so much. Much love <3 ...