I have written the below code to display a drop down menu when you run over a link. The layer displays and when the mouse runs out of the layer the layer disappears. When I have a link or a image in the layer running over the link or image is considered to be moving out of the layer and the layer closes. How can i prevent this?
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<p>
<a href="something.html" onmouseover="SubMenu('MenuExpand')">Here</a> </p>
<div onmouseout="HideSubMenu('MenuExpand')" id="MenuExpand" style="position:absolute; width:200px; height:115px; z-index:0; visibility:hidden">
<img src="test.jpg">
<br>
<a href="test.htm">Sub menu link 2</a>
<br>
<a href="test.htm">Sub menu link 3</a>
</div>
<p> </p>
<SCRIPT language="JavaScript">
function SubMenu(layerID)
{
if (document.all)
{
document.all[layerID].style.visibility="visible"
}
}
function HideSubMenu(layerID)
{
if (document.all)
{
document.all[layerID].style.visibility="hidden"
}
}
</SCRIPT>
</body>
</html>
thank you for you time
Andrew Wieland
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<p>
<a href="something.html" onmouseover="SubMenu('MenuExpand')">Here</a> </p>
<div onmouseout="HideSubMenu('MenuExpand')" id="MenuExpand" style="position:absolute; width:200px; height:115px; z-index:0; visibility:hidden">
<img src="test.jpg">
<br>
<a href="test.htm">Sub menu link 2</a>
<br>
<a href="test.htm">Sub menu link 3</a>
</div>
<p> </p>
<SCRIPT language="JavaScript">
function SubMenu(layerID)
{
if (document.all)
{
document.all[layerID].style.visibility="visible"
}
}
function HideSubMenu(layerID)
{
if (document.all)
{
document.all[layerID].style.visibility="hidden"
}
}
</SCRIPT>
</body>
</html>
thank you for you time
Andrew Wieland