Div Drop Down Menu

M

Mark Constant

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.
 
K

kaeli

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
 
M

Michael Winter

012345678901234567890123456789012345678901234567890123456789012345678912
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
 
M

Mark Constant

Michael Winter said:
012345678901234567890123456789012345678901234567890123456789012345678912

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


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top