I'm trying to make a simple rollover that changes image from black/white to color. The images are displayed in b/w and all end in "_bw.jpg" and on mouseOver I want to change to color - thoses images all end in "_cr.jpg"
My javascript is:
Expand|Select|Wrap|Line Numbers
- function mouseOver(imgName)
- {
- //alert(imgName + "_cr.jpg");
- document.imgName.src = imgName + "_cr.jpg";
- alert(document.imgName.src);
- }
- function mouseOut(imgName)
- {
- //alert(imgName + "_bw.jpg");
- document.imgName.src = imgName + "_bw.jpg";
- alert(document.imgName.src);
- }
Expand|Select|Wrap|Line Numbers
- <div align="center"><a href="Breakfast Menu.html"><img src="bfast_bw.jpg" name="bfast" width="399" height="600" alt="Breakfast" onmouseOver="mouseOver('bfast')" onmouseOut="mouseOut('bfast')" /></a>
and the images never change.
Any clue as to how lame I am?
Thanks,
Marty