I’m having a heck of a time getting the properties of a div tag. In this code, the mouseover event in the <IMG> tag calls a function. It should pass the <DIV> object to that function but the alert returns ‘src has no properties’.
Does anyone see what the problem is?
Thanks.
<script language=JavaScript>
function showMenu(src)
{
alert(src.type);
}
function hideMenu(menuToHide)
{
menuToHide.style.left = -200;
menuToHide.style.top = -1000;
}
function goPage(parcelhtm)
{
window.location.href = parcelhtm;
}
WoodMenuDiv = document.getElementById("WoodMenuDiv"
;
</script>
<html>
<body>
<div id=WoodMenuDiv Class="DivMenu" onmouseout="return hideMenu(this)">
<table border=1 cellspacing=1 cellpadding=1 id="WoodTable">
<tr>
<TD id="WoodOak" RollOver RollOut
onclick="goPage('parcelquery.htm')"
Class="TDMenu">
Oak Timber
</TD>
</tr>
</table>
</div>
<IMG ID="WoodMenuImage" SRC="identify_1.gif" Style="position:absolute;left:10;top:75"
onmouseover="return showMenu(WoodMenuDiv)"
onmouseout="return hideMenu(WoodMenuDiv)">
</body>
</html>
Does anyone see what the problem is?
Thanks.
<script language=JavaScript>
function showMenu(src)
{
alert(src.type);
}
function hideMenu(menuToHide)
{
menuToHide.style.left = -200;
menuToHide.style.top = -1000;
}
function goPage(parcelhtm)
{
window.location.href = parcelhtm;
}
WoodMenuDiv = document.getElementById("WoodMenuDiv"
</script>
<html>
<body>
<div id=WoodMenuDiv Class="DivMenu" onmouseout="return hideMenu(this)">
<table border=1 cellspacing=1 cellpadding=1 id="WoodTable">
<tr>
<TD id="WoodOak" RollOver RollOut
onclick="goPage('parcelquery.htm')"
Class="TDMenu">
Oak Timber
</TD>
</tr>
</table>
</div>
<IMG ID="WoodMenuImage" SRC="identify_1.gif" Style="position:absolute;left:10;top:75"
onmouseover="return showMenu(WoodMenuDiv)"
onmouseout="return hideMenu(WoodMenuDiv)">
</body>
</html>