Does anyone know a work around to make animated GIF's continue to be animated after you click a link or submit a form on the page your on in IE? This works fine in other browsers.
Thanks.
Does anyone know a work around to make animated GIF's continue to be animated after you click a link or submit a form on the page your on in IE? This works fine in other browsers.
Thanks.
A very easy way is to use jQuery and SimpleModal plugin. Then when I need to show my "loading" gif on submit, I do:
Found this solution at http://timexwebdev.blogspot.com/2009/11/html-postback-freezes-animated-gifs.html and it WORKS! Simply re-load image before setting to visible. Call the following Javascript function from your button's onclick:
Here's a jsFiddle that works just fine on form submit with method="post". The spinner is added on form submit event.
See jsFiddle code here
Test it in your IE browser here
I realize that this is an old question and that by now the original posters have each found a solution that works for them, but I ran across this issue and found that VML tags do not fall victim to this IE bug. Animated GIFs still move during page unload when placed on the IE browser using VML tags.
Notice I detected VML first before making the decision to use VML tags so this is working in FireFox and other browsers using normal animated GIF behavior.
Here's how I solved this.
Naturally, this relies on jQuery, jQueryUI and requires an animated GIF of some type ("/images/loading_gray.gif").
IE assumes that the clicking of a link heralds a new navigation where the current page contents will be replaced. As part of the process for perparing for that it halts the code that animates the GIFs. I doubt there is anything you can do about it (unless you aren't actually navigating in which case use return false in the onclick event).
Here's what I did. All you have to to is to break up your GIF to say 10 images (in this case i started with
01.gif
and ended with10.gif
) and specify the directory where you keep them.HTML:
JavaScript:
This method works with IE7, IE8 and IE9 (althought for IE9 you could use
spin.js
). NOTE: I have not tested this in IE6 since I have no machine running a browser from the 60s, although the method is so simple it probably works even in IE6 and lower.