View Full Version : Resolved Help With Mouseover

07-03-2011, 08:33 PM
I set up an image mouseover for the next button but its not working. I have two images set up but the second one wont appear when mousing over image.
You can see it at www.college-ebook.com

07-03-2011, 08:51 PM
there is a sytax error on your onMouseOut... you have onMouseOut"document.rollover.src=image1.src", there should be a = in there so it would read onMouseOut="document.rollover.src=image1.src"

also you have the onMouseOver and onMouseOut applied to the div tag. Have you tried applying them to the image itself?

07-03-2011, 09:02 PM
that syntax has now been fixed but it still doesn't work. Any thoughts?

07-03-2011, 09:07 PM
Please start debugging your code

There are exceptions everytime you hover your mouse and leave the NEXT button with your mouse

"image1 is not defined" on mouseover
"image2 is not defined" on mouseout

07-03-2011, 09:18 PM
ok, try something like this

<script type="text/javascript">
function rollover(x,y) {

then set the image up something like this

<img src="next.jpg" id="next" onmouseover="rollover(this.id,'next1.jpg')" onmouseout="rollover(this.id,'next.jpg')" />