Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Drop-Down Menu onmouseover

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Drop-Down Menu onmouseover

    I'm trying to set up a drop-down menu, but I really don't have any idea what I'm doing.
    I've inserted the code below, but need to make it so that it works with several menu topics (products, services, etc - see below).

    Is this code even close to what I need?

    script language="JavaScript" type="text/javascript">
     
    // showMenu function goes here
    function showMenu() {
        document.getElementById('productsMenu').style.visibility = "visible";
        document.getElementById('closer').style.visibility = "visible";
    } // end function 
     
    // hideMenu function goes here 
    function hideMenu() {
        document.getElementById('productsMenu').style.visibility = "hidden";
        document.getElementById('closer').style.visibility = "hidden";
    } // end function
     
    </script>
    </head>


    My navigation bar:

    <div id="navBar">
    		<ul>
    				<li><a href="#">home</a></li>
    				<li><a href="#" onmouseover="showMenu()">products</a></li>
    				<li><a href="#" onmouseover="showMenu()">services</a></li>
    				<li><a href="#" onmouseover="showMenu()">locations</a></li>
    				<li><a href="#" onmouseover="showMenu()">about us</a></li>
    				<li><a href="#" onmouseover="showMenu()">contact</a></li>
    		</ul>
    	</div>


  2. #2
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: Drop-Down Menu onmouseover

    This forum is for Java, not JavaScript. No, they're not the samething.

    db

Similar Threads

  1. Drag and Drop in JTrees
    By helloworld922 in forum Java Swing Tutorials
    Replies: 4
    Last Post: March 21st, 2014, 11:16 AM
  2. Looking for help with Walter Zorn's Drag & Drop script
    By yuri in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 19th, 2010, 02:52 AM
  3. Drag and Drop in JTrees
    By helloworld922 in forum AWT / Java Swing
    Replies: 2
    Last Post: January 19th, 2010, 11:51 PM
  4. Struts drop down
    By kalees in forum Web Frameworks
    Replies: 1
    Last Post: January 15th, 2010, 12:56 AM
  5. 'MouseUp' Drag and Drop Events
    By copeg in forum AWT / Java Swing
    Replies: 0
    Last Post: November 10th, 2009, 07:21 PM