I'm making a dhtml drop down menu, and while it works flawlessly in IE, it's giving me trouble in Netscape (go figure). The problem is if I move off of the image that makes the drop down appear, and onto the drop-down itself, it dissapears. I have onmouseover and onmouse events on both the link, and the drop-down, but netscape doesn't process the ones in the drop-down. below is an example of my code. Any help would be fantastic, I'm about to tear out my hair over this.
<script language="JavaScript" type="text/javascript">
var NN4 = document.layers? true : false;
var IE4 = document.all? true : false;
function show(layer) {
if (NN4) {
document.layers[layer].visibility = "show";
} else {
document.all[layer].style.visibility = "visible";
}
}
function hide(layer) {
if (NN4) {
document.layers[layer].visibility = "hidden";
} else {
document.all[layer].style.visibility = "hidden";
}
}
</script>
// first link
<a href="#" onMouseOver="show('menu1');" onMouseOut="hide('menu1');"><img src="../images/s_pullnav_veg.gif" width="185" height="21" border="0"></a>
// first drop down
<span id="menu1" style="visibility:hidden; position:absolute; top:197; left:268; z-index:50" onMouseOver="show('menu1');" onMouseOut="hide('menu1');">
** drop down text **
</span>
<script language="JavaScript" type="text/javascript">
var NN4 = document.layers? true : false;
var IE4 = document.all? true : false;
function show(layer) {
if (NN4) {
document.layers[layer].visibility = "show";
} else {
document.all[layer].style.visibility = "visible";
}
}
function hide(layer) {
if (NN4) {
document.layers[layer].visibility = "hidden";
} else {
document.all[layer].style.visibility = "hidden";
}
}
</script>
// first link
<a href="#" onMouseOver="show('menu1');" onMouseOut="hide('menu1');"><img src="../images/s_pullnav_veg.gif" width="185" height="21" border="0"></a>
// first drop down
<span id="menu1" style="visibility:hidden; position:absolute; top:197; left:268; z-index:50" onMouseOver="show('menu1');" onMouseOut="hide('menu1');">
** drop down text **
</span>