Javascript OnMouseOut SetTimer
Posted: Wed Oct 27, 2004 2:42 pm
I've changed this posting as I think it was far too much code for here... so I'll tackle the questions one at a time in difference posts. I have a javascript menu that appears on a OnMouseOver. I'd like to have it disappear on a OnMouseOut, but give users time to scroll over the accompanying menu that appears. I understand that I can do this with a SetTimeout function. Here's what I have thus far.
Unfortunately, when I do a mouseover on this, no menus appear at all.
Here's the trigger code:
Here's the javascript code:
Any help would be greatly appreciated!
Unfortunately, when I do a mouseover on this, no menus appear at all.
Here's the trigger code:
Code: Select all
<a href="javascript://" onMouseOver="menu('aboutus','visible')" onMouseOut="hide_menu('aboutus','hidden')">Code: Select all
<script language="JavaScript">
function menu (whichMenu,whatState){
if (document.getElementById)
{document.getElementById(whichMenu).style.visibility = whatState;}
else {documentїwhichMenu].visibility = whatState;}
}
function hide_menu (whichMenu,whatState){
setTimeout ('menu ('+this.whichMenu+','+this.whatState')', 1);
}
</script>