Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dropdown menu delay before dissapearing

Status
Not open for further replies.

dugen

Programmer
Jun 16, 2003
59
0
0
US

I have created a dropdown menu that i would like to stay open for a second after the user drags the mouse off of the layer.

Here is the code i have for the dropdown menu:

<img src="images/nav_practices_off.jpg" alt="" name="nav_practices_off" width="84" height="27" border="0" id="nav_practices_off" onmouseover="MM_swapImage('nav_practices_off','','images/nav_practices_on.jpg',1);MM_showHideLayers('Layer1','','show')" onmouseout="MM_swapImgRestore(); "window.setTimeout(MM_showHideLayers('Layer1','','hide')', 1000);" />


I am using window.setTimout to try to make this work, but the way the code is now once i rollover it, it stays open for good. Where should i be putting the window.setTimeout function?


Thanks



 
This would be a question for the forum216, because you're using JS as a behaviour to trigger your menu.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Hi

Well, the problem is indeed HTML. Invalid HTML.
Code:
<img src="images/nav_practices_off.jpg" alt="" name="nav_practices_off" width="84" height="27" border="0" id="nav_practices_off" onmouseover="MM_swapImage('nav_practices_off','','images/nav_practices_on.jpg',1);MM_showHideLayers('Layer1','','show')" onmouseout=[highlight #fee][red]"[/red]MM_swapImgRestore(); [red]"[/red][/highlight][gray]window.setTimeout(MM_showHideLayers('Layer1','','hide')', 1000);"[/gray] />
The [gray]gray[/gray] things after the closing double quote ( [red]"[/red] ) are "in air", not belongs to anything.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top