<SCRIPT LANGUAGE = "JavaScript">
<!--
if (document.images) {
img1on = new Image();
img1on.src = "image2.jpg";
img1off = new Image();
img1off.src = "image1.jpg";
}
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
}
function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");
}
}
<A HREF = "#"
onMouseOver = "imgOn('image2.jpg')"
onMouseOut = "imgOff('image1.jpg')"><img src="image1.jpg" width="150" height="150" NAME="img1" border="0" ALT = ""></a>
Ok...here is the code standard...without any php I have two database variables front_image1 and front_image2
I did this to make sure that my theory on how this works is correct!!!
Now....my two database variables represent the two states...front_image1 is the rest state...and front_image2(and they do work fine by the way....(the pics load..they just don't roll i
So...theoretically if I then work the code so that it looks like this
<A HREF = "#"
onMouseOver = "imgOn('<? echo $row->front_image2 ?>')"
onMouseOut = "imgOff('<? echo $row->front_image1 ?>')"><img src="<? echo $row->front_image1 ?>" width="150" height="150" NAME="img1" border="0" ALT = ""></a>
and at the top
img1on = new Image();
img1on.src = "<? echo $row->front_image2 ?>" ";
img1off = new Image();
img1off.src = "<? echo $row->front_image1 ?>" ";
}
Thank you so much for helping an idiot...John
"What I lack in intelligence I will make up for in persistance"
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
}
";
img1off = new Image();
img1off.src = "image1.jpg";
}
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
}
";
img1off = new Image();
img1off.src = "image1.jpg";
}
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");
}
}
See up top here is where the code wouldn't parse for some reason...it didnt kick out an error...just came up blank in post parse