I’m trying to get this ‘onMouseOver’ script to work, but when ever I move the mouse over the image, it just goes blank with a rectangle around it. I’m not getting any script errors, and nothing really stands out as being wrong. Here’s the code I’m using:
<script>
if (document.images) {
// on images
image1on = new Image();
image1on.src = “menu_djs_on.gif”;
// off images
image1off = new Image();
image1off.src = “menu_djs_off.gif”;
}
function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments*].src = eval(changeImages.arguments[i+1] + “.src”);
}
}
}
</script>
There are about 8 image statements, but I’ll just show you just enough code for 1, to shorten up this post.
This is the image html coding:
<td height=“13” width=“36”>
<a onmouseout=“changeImages(‘image1’, ‘image1off’)” onmouseover=“changeImages(‘image1’, ‘image1on’)” href=“http://www.yahoo.com”>
<img border=“0” height=“13” width=“36” src=“menu_data/menu_djs_off.gif” name=“image1”></a></td>
It is just a simple link, that when you put the mouse over the image, it changes color, nothing real fancy. See anything wrong here?