Forums / Developer / onmouseover
Dennis Howard
Friday 07 November 2003 6:13:30 am
How can I make image links that change when I move my mouse over the image?
Eirik Alfstad Johansen
Sunday 09 November 2003 6:21:14 am
Hi Dennis,
Here's an example, provided that the images you are using are located in the site design folder:
<img src={"images/first_image.gif"|ezdesign} width="50" height="50" alt="Some image" border="0" name="image" onmouseover="document.image.src={'images/second_image.gif'|ezdesign}" onmouseout="document.image.src={'images/first_image.gif'|ezdesign}" />
Sincerely,
Eirik JohansenNetmaking AS
http://www.netmaking.no/
Sincerely, Eirik Alfstad Johansen http://www.netmaking.no/
Golvier Jean
Sunday 09 May 2004 2:30:37 am
Hi,
I try this rollover method but it doesn'yt work because of quotes.
In my source file :
<img name="img4" src={"../images/thematiques/prestataires_gris_fr.gif"|ezimage} onmouseover="document.img4.src={'thematiques/prestataires_vert_fr.gif'|ezimage}" onmouseout="document.img4.src={'thematiques/prestataires_gris_fr.gif'|ezimage}">
become in IE :
<img name="img4" src="/design/news/images/thematiques/prestataires_gris_fr.gif" onmouseover="document.img4.src="thematiques/prestataires_vert_fr.gif"" onmouseout="document.img4.src="/design/news/images/thematiques/prestataires_gris_fr.gif"">
the error is caused by the translation of simple quotes to double quotes by ezimage but I don't know how to solve this problem.
Thanks for help,
Jean
Vanessa Merle
Monday 10 May 2004 4:44:22 am
Try this :
<img name="img4" src={"../images/thematiques/prestataires_gris_fr.gif"|ezimage} onmouseover='document.img4.src={"thematiques/prestataires_vert_fr.gif"|ezimage}' onmouseout='document.img4.src={"thematiques/prestataires_gris_fr.gif"|ezimage}'>
Vanessa
Monday 10 May 2004 5:46:23 am
And the winner is...
VANESSA
Thank you so much, it works well now. I tried hundreds of syntax but sometimes we are looking so far...