simple rollover problem

windows

Guest
rollover problem and would be very grateful for help <br />
<br />
I am doing this drop down menu where a submenu should be shown when the mouse is moved over the mainmenu.. here is a simple example<br />
<br />
<html><br />
<head><br />
<title><br />
</title><br />
<script language="JavaScript"><br />
<!--<br />
function showMenu(layerid) {<br />
layer= document.getElementById(layerid);<br />
layer.style.visibility="visible";<br />
}<br />
function hideMenu(layerid) {<br />
layer= document.getElementById(layerid);<br />
layer.style.visibility="hidden";<br />
}<br />
//--><br />
</script><br />
<table bgcolor=#cccccc><br />
<tr><br />
<td width=100><br />
<div id="menu1"<br />
style="position:absolute; top:45; width:100px; height:100px; z-index:1; background-color:#cccccc; visibility:hidden"><br />
<a href=http://www.htmlforums.com/archive/index.php/"#">Menu1</a><br />
</div><br />
<a href"#" onMouseOver="showMenu('menu1');"<br />
onMouseOut="hideMenu('menu1');"><br />
MENU</a></td></tr><br />
</table><br />
<br />
</body><br />
</html><br />
<br />
<br />
<br />
<br />
<br />
well, i want that the submenu is shown both when the mouse is moved over the mainmenu and, of course also when the mouse moves over the submenu! how do u do that? now with this example the submenu is hidden when the mouse moves out from the mainmenu (as it should be) but the "visible" effect should stay when the mouse is moved over the submenu as well... where should i enter this bit of mouseover effect?<br />
<br />
thanks<!--content-->the only thing i could think up is to do it with css<!--content-->
 
Back
Top