Click to See Complete Forum and Search --> : javaScript for onmouseout function
KrisLost
11-20-2003, 01:35 AM
I hope someone here can help me. I have a navigation bar where onmouseover causes a submenu to pop up. The problem is that there is no java scripting to take the pop-up away. The only way for it to disappear is to select another option from the menu which only brings up another pop up submenu. Does anyone know how to create a script function to tell the submenu to go away when the mouse has gone off of the submenu. I really appreciate any help you can give me.
Thanks,
Kris
Here's my code if you need to look at it http://krisfloral.topcities.com
Gollum
11-20-2003, 03:32 AM
It should be fairly straightforward to do...
on each of the <div> tags with and id that starts with "submenu_", you can add onmouseout="showDivs('submenu_',0);" which should hide the sub menu properly.
If you want to be really nice, you could give the user some grace time (say a second) in case they accidentally go out...
onmouseover="window.clearTimeout(this.mTimeout);" onmouseout="this.mTimeout = window.setTimeout('showDivs(\'submenu_\',0);',1000)"
KrisLost
11-20-2003, 09:24 AM
Thank you so much. That's perfect! I decided to be nice and give time. It's exactly what I needed. I don't know Java or HTML so am learning as I go. It's really taking forever. You've been more help than anyone in the past 2.5 weeks. I appreciate it very much.
Thanks again,
Kris
KrisLost
11-20-2003, 01:46 PM
Does Netscape navigator not see Java Script. For some reason, it changed the font and doesn't recognize my sub menus.
Thanks,
Kris