Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animated GIF in IE stopping

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.

like image 602
mattt Avatar asked Apr 23 '09 06:04

mattt


People also ask

Why are my GIF not moving?

If your GIF file is not playing or looping, it might be because the file is too large. If it's more than 1080 pixels high or 1920 pixels wide, you'll need to reduce the size. There are a number of free, online tools of varying sophistication that you can use.

How do you stop a GIF from finishing?

Open the Animated gif in Photoshop. Go to the Window tab and select timeline(if the timeline is not already open). At the bottom of the timeline panel, you will find an option, which says "Forever". Change that to "Once".

How do I get a GIF to play continuously?

Loop a part of an animated GIF image Or you can right-click and choose 'Split'. Right-click on the other clips and select 'Delete'. You can now add the same GIF file and repeat the process to create a loop.

How do you fix a GIF that doesn't loop?

How to Remove Loop From GIFs. The answer to the problem is very simple. Just open a GIF editor (or an editor that supports GIFs), then choose Remove loop option, and resave it.


2 Answers

The accepted solution did not work for me.

After some more research I came across this workaround, and it actually does work.

Here is the gist of it:

function showProgress() {     var pb = document.getElementById("progressBar");     pb.innerHTML = '<img src="./progress-bar.gif" width="200" height ="40"/>';     pb.style.display = ''; } 

and in your html:

<input type="submit" value="Submit" onclick="showProgress()" /> <div id="progressBar" style="display: none;">     <img src="./progress-bar.gif" width="200" height ="40"/> </div> 

So when the form is submitted, the <img/> tag is inserted, and for some reason it is not affected by the ie animation issues.

Tested in Firefox, ie6, ie7 and ie8.

like image 175
j.davies Avatar answered Jan 02 '23 09:01

j.davies


old question, but posting this for fellow googlers:

Spin.js DOES WORK for this use case: http://fgnass.github.com/spin.js/

like image 34
Entendu Avatar answered Jan 02 '23 09:01

Entendu