3 replies [Last post]
para_para_po
Offline
Regular
the hills
Last seen: 15 years 1 week ago
the hills
Joined: 2005-10-11
Posts: 11
Points: 0

i want to put a rollover image on my friendster page, i found somewhere that you can use these codes. here it is:

Basic image rollovers
You code image rollovers by using the onMouseover event handler to swap the first image with the second image. The onMouseout event handler swaps it back to the original image.
<a href="http://www.quackit.com/javascript/image_rollovers.cfm"
onMouseOver="/pix/smile.gif"
onMouseOut="/pix/nosmile.gif">
<img src="/pix/nosmile.gif"
width="100"
height="100"
border="0"
name="jack">
</a>

i did exactly what it said but it wont show. the only image that's showing is the 'onmouseout' image. yes, i have changed the urls of course. but why does not the image 'change'? please help. :?: :oops:

Anonymous
Anonymous's picture
Guru

Re: ROLLOVER IMAGES

This is a css forum. You are asking a javascript question.

You can do it with css but not that way.

Google ":hover"

para_para_po
Offline
Regular
the hills
Last seen: 15 years 1 week ago
the hills
Joined: 2005-10-11
Posts: 11
Points: 0

ROLLOVER IMAGES

i found again something somewhere,
and it says you should type this:

<a href="newpage.html" onMouseOver="document.MyImage.src='http://i4.photobucket.com/albums/y132/yayukoku/0snowbuttonblog.gif';" onMouseOut="document.MyImage.src='image1.gif';">
<img src="http://i4.photobucket.com/albums/y132/yayukoku/0snowbutton1.gif" name="MyImage">
</a>

so this is what i did:
<a href="newpage.html" onMouseOver="document.MyImage.src='http://img48.imageshack.us/img48/8919/fairy6gm.jpg';" onMouseOut="document.MyImage.src='http://img232.imageshack.us/img232/7830/iwant1lg.png';">
<img src="http://img232.imageshack.us/img232/7830/iwant1lg.png" name="MyImage">
</a>

if you want to check what really happened, here's a link to my friendsterpractice account:

http://www.friendster.com/user.php?uid=9907077

i hope this is enough information.

para_para_po
Offline
Regular
the hills
Last seen: 15 years 1 week ago
the hills
Joined: 2005-10-11
Posts: 11
Points: 0

ROLLOVER IMAGES

ow, ok. thanks for that. :oops: