Javascript Question
aristrauch (6 pencils) | Mon, 2009-06-22 05:36Hi everyone. First time writer.
I have a javascript coding question that I was hoping someone could help me with and that I am absolutely desperate for an answer for.
I have a two images, image1.gif and image2.gif. When you roll over image1.gif it becomes newimage1.gif and image2.gif becomes newimage2.gif. So you roll over one and both change. No problem there. The only other thing I want to do is to get one of the new images - newimage2.gif - to be an image map.
The code I have now is:
<script language="JavaScript">
if (document.images) {
pic1on = new Image(226, 93);
pic1on.src = "images/newimage1.gif";
pic2on = new Image(684, 296);
pic2on.src = "images/newimage2.gif";
}
function lightup(imgName, imgName2) {
if (document.images) {
imgOn = eval(imgName + "on.src");
document[imgName].src = imgOn;
imgOn2 = eval(imgName2 + "on.src");
document[imgName2].src = imgOn2;
}
}
//-->
</script>
Do you know what I would have to add to the code to make this happen?
If you have any idea and would be able to provide me with the information it would be GREATLY, GREATLY appreciated. Again, I am desperate.
Thank you for listening.
Sincerely,
Ari
Commenting on this Forum topic is closed.



I see my code did not come out on the post. If someone has any information I will explain. Thanks again.
Ari