|
I'm getting an error message in FF2.0:
document.getElementById(toggle[i]) has no properties
The goal of the script is, when I hover my mouse over an image, to make one div element visible while making all the others div elements in the array, hidden.
thisDocId is the element to avoid hiding.
This is the script:
[HTML]<script>
function makeHidden(thisDocId) {
var toggle = new Array();
toggle[0] = "about_us";
toggle[1] = "merchants";
toggle[2] = "associations";
toggle[3] = "consumers";
toggle[4] = "newsandevents";
for (i=0;i<toggle.length;i++) {
if (toggle[i] != thisDocId) {
document.getElementById(toggle[i]).visibility="hidden";
}
}
} //end makeHidden function
</script>[/HTML]
This is part of the HTML:
[HTML]<a href="aboutus.html"><img src="images/H0m2.jpg" alt="" name="Image2" align="top" onmouseover='document.getElementById("about_us").v isibility="visible"; makeHidden("about_us");' /></a>[/HTML]
So the idea is to display a <div> menu while toggling the other menus to "hidden";
|