Jump to content

Image change on onMouseOut

Recommended Posts

Hello, I'm a novice at HTML so chances are I'm not doing this the correct way. What I want to do is have an image on the page either flip from one image to another, or prefrably have an image appear where there was no image before when I hover over the link. I've added this to a link.<tr><td class="links"><a href="StartPage.html" onMouseOver="document.pic1.src='index/Earth.gif'" onMouseOut="document.pic1.src='index/health.gif">Health Stuff</a></td></tr>The image.....<td class="peek"><center><span ><img name="pic1"></SPAN> </center></td>I see a change when I onMouseOver but no change onMouseOut.What am I doing wrong?

Link to post
Share on other sites

Here is a site I built almost 10 years ago. Look at the source code and refer to javascript there - it's one of the cleanest mouseover scripts you'll find.http://www.deepcreeklakebreezmotel.com/If you want to replace an image that "isn't there" then put a blank/transparent gif/png as a place holder to where you want the image to go.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...