HighDots Forums  

Div Drop Down Menu

Javascript JavaScript language (comp.lang.javascript)


Discuss Div Drop Down Menu in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Constant
 
Posts: n/a

Default Div Drop Down Menu - 04-19-2004 , 01:15 PM






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.

Reply With Quote
  #2  
Old   
kaeli
 
Posts: n/a

Default Re: Div Drop Down Menu - 04-19-2004 , 02:55 PM






In article <ce43fdea.0404191015.7b7f3a56 (AT) posting (DOT) google.com>,
constants (AT) mix-net (DOT) net enlightened us with...
Quote:
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.

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.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace



Reply With Quote
  #3  
Old   
Michael Winter
 
Posts: n/a

Default Re: Div Drop Down Menu - 04-19-2004 , 06:35 PM



On 19 Apr 2004 11:15:48 -0700, Mark Constant <constants (AT) mix-net (DOT) net> wrote:

01234567890123456789012345678901234567890123456789 0123456789012345678912
Quote:
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
Sorry to nit-pick, but it's the "onmouseover event" or "onmouseover
intrinsic event".

Quote:
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.
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 (AT) blueyonder (DOT) co.invalid (replace ".invalid" with ".uk" to reply)


Reply With Quote
  #4  
Old   
Mark Constant
 
Posts: n/a

Default Re: Div Drop Down Menu - 04-20-2004 , 10:41 AM



Michael Winter <M.Winter (AT) blueyonder (DOT) co.invalid> wrote

Quote:
On 19 Apr 2004 11:15:48 -0700, Mark Constant <constants (AT) mix-net (DOT) net> wrote:

01234567890123456789012345678901234567890123456789 0123456789012345678912
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

Sorry to nit-pick, but it's the "onmouseover event" or "onmouseover
intrinsic event".

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.

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

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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.