Click to See Complete Forum and Search --> : menu roll off problem!!


rustler2001
01-10-2003, 03:48 AM
I have a script in javascript for a menu for navigation. Basically its the old drop down menu from a horizontal naviagtion bar across the top.
The only problem is that when i rollover the drop down menu stays open until roll onto another area or click in the page below. Can anyone help me .
I would like the menu to stay open for a second or two before closing once i have rolled off it.
I have attached the js file as a txt file if anyone wants to look.
Cheers
Russell

vickers_bits
01-10-2003, 04:06 AM
well i couldn't find the attachment so i'll just assume your using a div or table to encase each dropdown. within this element you could use a mouseout event handler to hide all dropdowns. and to delay hiding it use a setTimeOut
1st parameter is the function name
the 2nd is delay time in milliseconds

eg onmouseout='setTimeout("hideAllDropDown()", 2000);'

rustler2001
01-10-2003, 05:05 AM
Vickers_bits
thanks for the quick response, sorry i didnt add the file earlier for some reason it wouldnt except it.
I have got the menus in a DIV, but havent applied any javascript to that individual html page.
All the js is added in the js file itself. Can you have a look at it and let me know what you think and where i need to add the script, or even mail it to me.
Thanks for all your help
Russell