PDA

View Full Version : Mouseover


dudeking
August 3rd, 2006, 07:02 PM
I havnt done a mouseover for ages, Do you have to have the script in the head?
I can remeber not putting it in but my mouse over dosnt work with out it.
<a href="contact/index.php" onmouseover="document.contact.src=images/contactme2.gif" onmouseout="document.contact.src=images/contactme2.gif">
<img src="images/contactme1.gif" alt="contact me" name="contact" id="contact" border="0">
</a>

Sorry I know its a stupid question:happy:

degsy
August 4th, 2006, 10:20 AM
You are using an inline javascript. You only need the script in the head if it is a function and even then it is not absolutely neccessary.

dudeking
August 4th, 2006, 11:14 AM
Got it working with just this:-
<a href="http://hexzero.co.uk/contact/index.php"
onMouseOver="document.the_image2.src='http://hexzero.co.uk/images/contactme2.gif';"
onMouseOut="document.the_image2.src='http://hexzero.co.uk/images/contactme1.gif';">
<img src="http://hexzero.co.uk/images/contactme1.gif" name="the_image2" border="0" />
</a>