FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


THIS IS DRIVING ME MAD [resolved]





Mark999111
Ok

i want a rollover image affect, like whent he mouse rolls over and image the image changes. I tried using html and failed.

I dont care what script type or whatever you use, but can someone give me the code for doing this? Ive looked up google but i couldnt understand what the heck these guys were trying to say.

So the original image is http://bop.frih.net/home.jpg

and i want it to change to http://bop.frih.net/home2.jpg

Can anyone help?

EDIT: doesnt matter, i ripped the code off a guy from schools site, works well!
Chris Tiaens
Here's your code:

Code:
<img src="home.jpg" name="home" onmouseover="document.home.src='home2.jpg'" onmouseout="document.home.src='home.jpg'">


Some remarks:

1: It won't work if the images aren't placed in the same folder! In that case you should change 'home(2).jpg' in 'http://bop.frih.net/home(2).jpg'.

2: If you are using xhtml in stead of common html you should end the tag like this: <img ... />

In case my explanation isn't understandable, feel free to aks.

Hope it helps.
Related topics
Favourite game? (OFFICIAL THREAD)
Bumper Stickers
Art of writing love-letters
Mad Scientist
Points and FRIH$ -- RESOLVED --
Mad Sheep
[RESOLVED]Resend Account Details Please!
Christmas!...
UK Supermarket surgeries
MAD COW
PhpBB Ranks <RESOLVED>
MAD
Driving and Speeding
Discrimination against Christian - a real case :-)
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.