shep
02-12-2005, 06:38 PM
Hello:
I have a small problem, and was hoping that someone who's good with Java can help. I have a small Java script that a friend wrote for me, that performs a mouse over action, so when people put there mouse on a different link, the button changes. Unfortunately, this only seems to work on the index.htm page, and none of the other pages? I copied the pages exactly, and the header is the same. I get a javascript error when I mouse over any other page except the index.htm. Anyone have any idea why? I've posted the script below. Any help would be appreciated.
Thanks
shep
<!--
//rollovers...
if(document.images) {
homeoff = new Image();
homeoff.src = "images/homeoff.gif";
homeover = new Image();
homeover.src = "images/homeover.gif";
aboutoff = new Image();
aboutoff.src = "images/aboutoff.gif";
aboutover = new Image();
aboutover.src = "images/aboutover.gif";
conoff = new Image();
conoff.src = "images/conoff.gif";
conover = new Image();
conover.src = "images/conover.gif";
prodoff = new Image();
prodoff.src = "images/prodoff.gif";
prodover = new Image();
prodover.src = "images/prodover.gif";
servoff = new Image();
servoff.src = "images/servoff.gif";
servover = new Image();
servover.src = "images/servover.gif";
}
function onoff(imgName,state) {
if(document.images) {
document.images[imgName].src = eval(imgName+state+".src");
}
}
//-->
I have a small problem, and was hoping that someone who's good with Java can help. I have a small Java script that a friend wrote for me, that performs a mouse over action, so when people put there mouse on a different link, the button changes. Unfortunately, this only seems to work on the index.htm page, and none of the other pages? I copied the pages exactly, and the header is the same. I get a javascript error when I mouse over any other page except the index.htm. Anyone have any idea why? I've posted the script below. Any help would be appreciated.
Thanks
shep
<!--
//rollovers...
if(document.images) {
homeoff = new Image();
homeoff.src = "images/homeoff.gif";
homeover = new Image();
homeover.src = "images/homeover.gif";
aboutoff = new Image();
aboutoff.src = "images/aboutoff.gif";
aboutover = new Image();
aboutover.src = "images/aboutover.gif";
conoff = new Image();
conoff.src = "images/conoff.gif";
conover = new Image();
conover.src = "images/conover.gif";
prodoff = new Image();
prodoff.src = "images/prodoff.gif";
prodover = new Image();
prodover.src = "images/prodover.gif";
servoff = new Image();
servoff.src = "images/servoff.gif";
servover = new Image();
servover.src = "images/servover.gif";
}
function onoff(imgName,state) {
if(document.images) {
document.images[imgName].src = eval(imgName+state+".src");
}
}
//-->