Click to See Complete Forum and Search --> : Image flip - Shouldn't this work?


Slinkiroth
09-08-2007, 08:48 PM
I'm pretty sure there is nothing wrong with my code... Well, actually there must be as it doesn't work =/ Take a look:

<HEAD>
<script language="javascript" type="text/javascript">
Image1=new Image(81,31)
Image1.src="./images/button_news_flip.png"
</HEAD>

<a href="index.html" onmouseover="document.Image1.src='./images/button_news_flip.png';"

onmouseout="document.Image1.src='./images/button_news.png';"><img src="./images/button_news.png"></A>

NogDog
09-08-2007, 10:31 PM
<img src="./images/button_news.png" name="Image1">

Also, don't forget the closing </script> tag.

Slinkiroth
09-09-2007, 08:10 AM
Thanks for the reply :)

I closed the script and added name="Image1" but now the image is broken?

Edit: Aha! Thank you! Acidentally missed out quotation marks!

Tahnks again :)