Click to See Complete Forum and Search --> : Image Swapping
nmretd
Jun 17th, 2000, 07:23 PM
I want to use the image swap method. When I put my cursor over the text the image changes. However, when I take away the cursor I want the image to return to the original image.
Can someone show me how to code this please ?
nmretd.
Clunietp
Jun 18th, 2000, 02:48 AM
<IMG SRC=BACKGRND.GIF onmouseover="this.src='cloud.gif'" onmouseout="this.src='backgrnd.gif'">
nmretd
Jun 18th, 2000, 03:52 PM
Thanks, that works fine. One more question if I may:
I am using the following code:
<html>
<head>
<title>Image Swapping Example</title>
</head>
<body>
<h1>Image Swapping</h1>
<IMG SRC=ms.GIF onmouseover="this.src='bb.gif'" onmouseout="this.src='ms.gif'"
</body>
</html>
How can I modify this so that the image changes when I put my mouse over a Hyperlink (next to the image) and goes back to the original image when I take the mouse away ?
nmretd.
Clunietp
Jun 18th, 2000, 11:09 PM
for the ONMOUSEOVER/ONMOUSEOUT event for the link, change the source of the picture (document.myImage.src='somefile.gif')
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.