I am trying to swap out a hover image with javascript but it doesn’t seem to be working, any idea why? I thought this was the correct way to do this.
<li>
<a onMouseOver="document.fbi.src=images/facebookIconHover.jpg" onMouseOut="document.fbi.src=images/facebookIcon.jpg"
href="http://www.facebook.com">
<img src="images/facebookIcon.jpg" NAME="fbi">
</a>
</li>
It looks like all you need to do (assuming those images exists) is put single quotes around the
srcstring.I would suggest you use CSS
:hoverfor the images though, as it separates presentation from content/scripting.