Div Drop Down Menu

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Constant

    #1

    Div Drop Down Menu

    I am taking a Javascript course online. We are learning to create
    drop-down menus with <div> layers. The problem is that the way the
    books teachers us to get the dropdown menu to work you have to click
    the link once and twice to get rid of the menu. I am doing my final
    project and I want to use the
    OnMouseOver() function to get the menu open. The only problem is when
    I do OnMouseOver on the link it opens the menu but when I go to click
    something on the menu the menu disappears because my mouse isn't over
    the original link anymore. Is there anyway to keep that menu open even
    after I leave the link? I don't need exact code since this is my
    project and I don't need anybody to do my homework. I just would
    appreciate a point in the right direction.
  • kaeli

    #2
    Re: Div Drop Down Menu

    In article <ce43fdea.04041 91015.7b7f3a56@ posting.google. com>,
    constants@mix-net.net enlightened us with...[color=blue]
    > I am taking a Javascript course online. We are learning to create
    > drop-down menus with <div> layers. The problem is that the way the
    > books teachers us to get the dropdown menu to work you have to click
    > the link once and twice to get rid of the menu. I am doing my final
    > project and I want to use the
    > OnMouseOver() function to get the menu open. The only problem is when
    > I do OnMouseOver on the link it opens the menu but when I go to click
    > something on the menu the menu disappears because my mouse isn't over
    > the original link anymore. Is there anyway to keep that menu open even
    > after I leave the link? I don't need exact code since this is my
    > project and I don't need anybody to do my homework. I just would
    > appreciate a point in the right direction.
    >[/color]

    hints:
    onMouseOut should close main menu.
    setTimeout should be in the onMouseOut handler to keep open for a couple
    seconds.
    onMouseOver of a submenu should clear main timeOut so menu doesn't
    close, then invoke it's own close with mouseOut/timeout.

    --
    --
    ~kaeli~
    The Bermuda Triangle got tired of warm weather. It moved to
    Finland. Now Santa Claus is missing.



    Comment

    • Michael Winter

      #3
      Re: Div Drop Down Menu

      On 19 Apr 2004 11:15:48 -0700, Mark Constant <constants@mi x-net.net> wrote:

      012345678901234 567890123456789 012345678901234 567890123456789 012345678912[color=blue]
      > I am taking a Javascript course online. We are learning to create
      > drop-down menus with <div> layers. The problem is that the way the books
      > teachers us to get the dropdown menu to work you have to click the link
      > once and twice to get rid of the menu. I am doing my final project and I
      > want to use the OnMouseOver() function to get the menu[/color]

      Sorry to nit-pick, but it's the "onmouseove r event" or "onmouseove r
      intrinsic event".
      [color=blue]
      > open. The only problem is when I do OnMouseOver on the link it opens the
      > menu but when I go to click something on the menu the menu disappears
      > because my mouse isn't over the original link anymore. Is there anyway
      > to keep that menu open even after I leave the link? I don't need exact
      > code since this is my project and I don't need anybody to do my
      > homework. I just would appreciate a point in the right direction.[/color]

      An alternative approach to the one Kaeli suggested is to extend the box
      (CSS term) that contains the link so that the mouse doesn't actually leave
      the link area. It is a little more tricky, but will probably produce
      better results.

      Good luck,
      Mike

      --
      Michael Winter
      M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

      Comment

      • Mark Constant

        #4
        Re: Div Drop Down Menu

        Michael Winter <M.Winter@bluey onder.co.invali d> wrote in message news:<opr6p87xb k5vklcq@news-text.blueyonder .co.uk>...[color=blue]
        > On 19 Apr 2004 11:15:48 -0700, Mark Constant <constants@mi x-net.net> wrote:
        >
        > 012345678901234 567890123456789 012345678901234 567890123456789 012345678912[color=green]
        > > I am taking a Javascript course online. We are learning to create
        > > drop-down menus with <div> layers. The problem is that the way the books
        > > teachers us to get the dropdown menu to work you have to click the link
        > > once and twice to get rid of the menu. I am doing my final project and I
        > > want to use the OnMouseOver() function to get the menu[/color]
        >
        > Sorry to nit-pick, but it's the "onmouseove r event" or "onmouseove r
        > intrinsic event".
        >[color=green]
        > > open. The only problem is when I do OnMouseOver on the link it opens the
        > > menu but when I go to click something on the menu the menu disappears
        > > because my mouse isn't over the original link anymore. Is there anyway
        > > to keep that menu open even after I leave the link? I don't need exact
        > > code since this is my project and I don't need anybody to do my
        > > homework. I just would appreciate a point in the right direction.[/color]
        >
        > An alternative approach to the one Kaeli suggested is to extend the box
        > (CSS term) that contains the link so that the mouse doesn't actually leave
        > the link area. It is a little more tricky, but will probably produce
        > better results.
        >
        > Good luck,
        > Mike[/color]


        Thank you for the suggestion. I ended up using Kaeli hints last night
        and got it working. Sorry for calling it a function(). I have taken
        enough programming languages that I should atleast make sure that I
        use the right terminology.

        Comment

        Working...