View Single Post
  #1 (permalink)  
Old Jul 25th, 2006, 07:37
Allu Allu is offline
New Member
Join Date: May 2006
Location: England
Age: 26
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Button animation help!!

Hey

I've got a web page that contains links. I've found a script I can use to make the links change color when the mouse is over.

The page is:
www.laasanen.net/alina/paasivu.html

One of the links contain script which is the red one. As you can see it turns grey when the mouse is over it.

The script I'm using is:

<html>
<head>
<script type="text/javascript">
function mouseOver()
{
document.b1.src ="b_blue.gif"
}
function mouseOut()
{
document.b1.src ="b_pink.gif"
}
</script>
</head>

<body>

<a href="http://www.w3schools.com" target="_blank"
onmouseover="mouseOver()"
onmouseout="mouseOut()">
<img border="0" alt="Visit W3Schools!" src="b_pink.gif" name="b1" width="26" height="26" /></a>

</body>
</html>

I'm having trouble making using this code at least twice on the same page. How is this done? The thing that happens for me is that the next link I make does not change color when the mouse is over it but the first link I made, which is now seen on the web page, changes color, even though the mouse is over the other link. I hope this made sense at all. I really need help. I guess the question is that how do I use this script on several links o the same page??
-Al

Last edited by Allu; Jul 25th, 2006 at 07:39.
Reply With Quote