Tyrant Posted February 2, 2006 Share Posted February 2, 2006 I have two buttons on my site, which I want both to act the same. This is the good old w3 tutorial script which I use: <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" /></a></body></html> Now this just works fine if I use it on one button, but it stopps working when I try to use it on many buttons. I just use this part of script both for my first and second button: <a href="http://www.w3schools.com" target="_blank"onmouseOver="mouseOver()"onmouseOut="mouseOut()"><img border="0" alt="Visit W3Schools!"src="b_pink.gif" name="b1" /> I already understood that I`m doing wrong, I searched for topics like this, but unfortunately there wasn`t said anything about bigger amounts of animated buttons, that are acting the same. Link to comment Share on other sites More sharing options...
Tyrant Posted February 2, 2006 Author Share Posted February 2, 2006 Nevermind, took me a half of the day, but I figured it out. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now