Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

First Defeat

Recommended Posts

I have 3 images that change to short animated gif's onmouseover and into a second animated gif onmouseout...

 

This works fine in ie but in firefox all the three images change to the "out animation" onmouseout

 

 

Code:

if (document.images) {	a2alpha = new Image();	alpha2a = new Image();	a2alpha.src = "graphics/a2alpha.gif";	alpha2a.src = "graphics/alpha2a.gif";}else {	a2alpha.src = "";	alpha2a.src = "";}function animate(arrow) {	document.getElementById('arrow' + arrow).src = a2alpha.src;}function deanimate(arrow) {	document.getElementById('arrow' + arrow).src = alpha2a.src;}....<img src="graphics/arrow.gif" class="arrow" id="arrow1" style="top: 201px;"><img src="graphics/spacer.gif" class="boverlay" style="top: 190px;" onmouseover="active('1'); animate('1');" onmouseout="deactive('1'); deanimate('1');"><img src="graphics/arrow.gif" class="arrow" id="arrow2" style="top: 273px;"><img src="graphics/spacer.gif" class="boverlay" style="top: 262px;" onmouseover="active('2'); animate('2');" onmouseout="deactive('2'); deanimate('2');"><img src="graphics/arrow.gif" class="arrow" id="arrow3" style="top: 345px;"><img src="graphics/spacer.gif" class="boverlay" style="top: 334px;" onmouseover="active('3'); animate('3');" onmouseout="deactive('3'); deanimate('3');">
I have noticed that, in firefox, it works fine the first time the function is called and the second time it then changes both the new "arrow" and the old one.

 

Is this a common firefox problem that i have missed?

 

All help is appreciated

 

Kvarnerexpress

 

Notice from snlildude87:
All code goes in the
 BBCode tags. Thank you.
Edited by snlildude87 (see edit history)

Share this post


Link to post
Share on other sites

Hmm, in Firefox, go to Tools -> Options... -> Web Features -> make sure the JavaScript checkbox is checked -> Advanced ... -> make sure Change Images at the bottom is checked.

If that doesn't work, try reading my post about rollover images, and see if you can try to incorporate it into your page. :)

Feel free to PM me or post a reply if it doesn't work out!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.