For some reason when I add additional buttons a 3rd button and beyond
i cant get the effect to work and I get errors...I cant understand
why...
<SCRIPT LANGUAGE = "javascript "><!--
if (document.image s) { // Active Images
img1on = new Image();
img1on.src = "button1_on.jpg ";
img2on = new Image();
img2on.src = "button2_on.jpg ";
img1off = new Image();
img1off.src = "button1_off.jp g";
img2off = new Image();
img2off.src = "button2_off.jp g"; }
// Function to 'activate' images.
function imgOn(imgName) {
if (document.image s) {
document[imgName].src = eval(imgName + "on.src");
}
}
// Function to 'deactivate' images.
function imgOff(imgName) {
if (document.image s) {
document[imgName].src = eval(imgName + "off.src");
}
}
// -->
</SCRIPT>
<A HREF="page1.htm " onMouseOver="im gOn('img1')"
onMouseOut="img Off('img1')">
<IMG NAME="img1" SRC="button1_of f.jpg" ALT="mouseover button"
HEIGHT="30"
WIDTH="147" VSPACE="0" HSPACE="0" BORDER="0"></A>
<A HREF="page2.htm " onMouseOver="im gOn('img2')"
onMouseOut="img Off('img2')">
<IMG NAME="img2" SRC="button2_of f.jpg" ALT="another mouseover button"
HEIGHT="30"
WIDTH="147" VSPACE="0" HSPACE="0" BORDER="0"></A>
i cant get the effect to work and I get errors...I cant understand
why...
<SCRIPT LANGUAGE = "javascript "><!--
if (document.image s) { // Active Images
img1on = new Image();
img1on.src = "button1_on.jpg ";
img2on = new Image();
img2on.src = "button2_on.jpg ";
img1off = new Image();
img1off.src = "button1_off.jp g";
img2off = new Image();
img2off.src = "button2_off.jp g"; }
// Function to 'activate' images.
function imgOn(imgName) {
if (document.image s) {
document[imgName].src = eval(imgName + "on.src");
}
}
// Function to 'deactivate' images.
function imgOff(imgName) {
if (document.image s) {
document[imgName].src = eval(imgName + "off.src");
}
}
// -->
</SCRIPT>
<A HREF="page1.htm " onMouseOver="im gOn('img1')"
onMouseOut="img Off('img1')">
<IMG NAME="img1" SRC="button1_of f.jpg" ALT="mouseover button"
HEIGHT="30"
WIDTH="147" VSPACE="0" HSPACE="0" BORDER="0"></A>
<A HREF="page2.htm " onMouseOver="im gOn('img2')"
onMouseOut="img Off('img2')">
<IMG NAME="img2" SRC="button2_of f.jpg" ALT="another mouseover button"
HEIGHT="30"
WIDTH="147" VSPACE="0" HSPACE="0" BORDER="0"></A>
Comment