...

View Full Version : Menu appear/dissapear



crazycheetah
08-20-2002, 09:21 PM
Ok, i'm kinda new at JavaScript still, but I was wanting something where when you click on a specific link I want a list a Popup (I was thinking of using Layers to do this) to come up that gave you a few choices. Then the user could select out of these choices, or they could click on a Close link and close the Popup menu. If I could get any help with this it would be greatly appreciated.

redhead
08-20-2002, 09:29 PM
try this:



<script>
function doMenu(v) {
if (v) { view="visible";
} else {
view="hidden";};
if(document.layers){
document.menu.visibility=view;
};
if(document.all){
document.all.menu.style.visibility=view;
};
if(document.getElementById){
document.getElementById("menu").style.visibility=view;
};
};
</script>

<div id="menu" style="visibility: hidden">

your menu here

</div>

<a href="javascript:doMenu(1)">Show Menu</a>
<a href="javascript:doMenu(0)">Hide Menu</a>


take out the space in "javascript:", place you rmenu where it says "your menu here"... should work fine.

:thumbsup:

crazycheetah
08-20-2002, 09:45 PM
ok, that worked great, but how would i get it to not show up from the beginning?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum