Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Location
    your worst nightmare
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Menu appear/dissapear

    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.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try this:

    Code:
    <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.

    redhead

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Location
    your worst nightmare
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, that worked great, but how would i get it to not show up from the beginning?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •