mrkidd85 Posted March 16, 2006 Share Posted March 16, 2006 hey, i'm new to javascript, and I tried the animated banner code on my site as taught on this site. It worked fine with the first button, it changed colour when highlited, then when I repeat the code and attempt to do the same to my next button, not only does it not work but it stops the other one from working again.I used this <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> when i did this I then copied it and wrote out the next thing but it doesn't work. both of them now stay on the mouseout image. can anyone help me? Link to comment Share on other sites More sharing options...
scott100 Posted March 17, 2006 Share Posted March 17, 2006 Have a look at this post: http://w3schools.invisionzone.com/index.ph...wtopic=2949&hl=It gets a bit more complicated when you use more than one rollover on a page. 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