PDA

View Full Version : Simple Rollover giving erros in Netscape


details
09-14-2002, 12:08 AM
I am getting image1on is not defined. and image1off is not defined. when viewed in Netscape 4. Any suggestions?


<SCRIPT>
<!--
if (document.images) {
image1on = new Image();
image1on.src = "hm_on.gif";

image1off = new Image();
image1off.src = "hm_off.gif";

}

function turnOn(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "on.src");
}
}

function turnOff(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "off.src");
}
}
-->
</SCRIPT>


<a href="#" onMouseOver="turnOn('image1')" onMouseOut="turnOff('image1')"><IMG SRC="hm_off.gif" WIDTH=175 HEIGHT=13 BORDER=0 NAME="image1"></a>:confused:

umm
09-14-2002, 08:38 AM
ummm...ahhh....

Originally posted by details
I am getting image1on is not defined. and image1off is not defined. when viewed in Netscape 4. Any suggestions?


<SCRIPT>
<!--
if (document.images) {
image1on = new Image();
image1on.src = "hm_on.gif";

image1off = new Image();
image1off.src = "hm_off.gif";

}

function turnOn(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "on.src");
}
}

function turnOff(imageName) {
if (document.images) {
document[imageName].src = eval(imageName + "off.src");
}
}
// -->
</SCRIPT>


<a href="#" onMouseOver="turnOn('image1')" onMouseOut="turnOff('image1')"><IMG SRC="hm_off.gif" WIDTH=175 HEIGHT=13 BORDER=0 NAME="image1"></a>:confused: