SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: Creating A Menu

  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating A Menu

    hey, i wanted to create a menu, where if you go to one option , a sdie menu opens up

    so i displayed the menu images, and set the onmouseover event to call functions which would display the side menus

    so in the function drawmenu1() to draw the side menu 1 i wrote

    "document.write("<img src=eagle.jpg"></img>");

    but then only that image is displayed and the rest is erased.

    so what do i do to display the menu keeping other elements intact.

    also how do i hide the menu once my mouse goes out???
    please help me


    here is my code till now and i am confused about the rest.

    <script type=text/javascript>

    function drawmenu1()
    {
    document.write("<img src=eagle.jpg></img>");
    }

    </script>

    <img src=menu1.jpg onmouseover=drawmenu1()></img>
    <img src=menu1.jpg onmouseover=drawmenu2()></img>
    <img src=menu1.jpg onmouseover=drawmenu3()></img>
    <img src=menu1.jpg onmouseover=drawmenu4()></img>
    <img src=menu1.jpg onmouseover=drawmenu5()></img>

  2. #2

  3. #3
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but tell me the answer. I have tried many things.

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you show us the other things you tried?
    Quote Originally Posted by phpnovice from WebDeveloper.com Forums
    You see, this site is not intended as a place to obtain free contract-programming services. Everybody that answers questions here are just visitors to this site -- as you were. Thus, someone that just lays out a huge task, instead of just a particular problem that needs resolving, comes across as not just wanting "help" but seems to actually be hoping that someone else will do it for them. That is not acceptable.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi greenberet123,

    I've found an example of pop-up menu here:
    http://www.sothink.com/

    Is this the side menus you mentioned?

  6. #6
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats exactly the thing. Those menus on the top which expand when your mouse goes over them.

    i tried puttting those menu images. and displaying the drop down menu itself(but keeping it hidden) and when a mouseover event occurs i set the drop down part style to visible, so that it shows. But i cant get the drop down menu to the right position.

  7. #7
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    visit

    www.india-linux.byethost13.com

    keep the mouse pointer over the first HOME button and see what happens.

    I want the menu to appear right below the HOME button as a drop down menu but whatever i set its top and left to , it just wont move from that place.

  8. #8
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey, i got the menu working

    but the images for the mouseover event take a lot of time to load

    so i want all to be loaded before the page fully loads
    how do i do that

  9. #9
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    U need to preload the images. Use google on how to preload images with JavaScript and you will get tons of hits.


Bookmarks

Posting Permissions

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