admin管理员组

文章数量:1333210

After a button is clicked to start a process on my web app, I show a small loading gif (animated) that rotates to indicate to the user something is happening. I put the gif img in place of the button like this using JQuery:

$('#btn_holder').html('<img src="images/loading2.gif" style="margin-left:40px; margin-top:7px;" />');

This works great in all browsers (Firefox, IE8, Chrome) except IE7 on a windows server 2003.

In IE, the gif appears but it is not animated. What's going on with IE7? How can I test what the problem is?

Thanks all

After a button is clicked to start a process on my web app, I show a small loading gif (animated) that rotates to indicate to the user something is happening. I put the gif img in place of the button like this using JQuery:

$('#btn_holder').html('<img src="images/loading2.gif" style="margin-left:40px; margin-top:7px;" />');

This works great in all browsers (Firefox, IE8, Chrome) except IE7 on a windows server 2003.

In IE, the gif appears but it is not animated. What's going on with IE7? How can I test what the problem is?

Thanks all

Share Improve this question asked Apr 19, 2010 at 11:48 AbsAbs 58k103 gold badges282 silver badges417 bronze badges 2
  • 1 IE7 on Windows Server likely has very restrictive security permissions, it probably won't allow the active gif animation. Try testing on XP or Vista – roryf Commented Apr 19, 2010 at 11:51
  • Does it work if you add it before submitting the form? – SLaks Commented Apr 19, 2010 at 11:51
Add a ment  | 

2 Answers 2

Reset to default 8

Maybe it's a problem with your IE7, (this happened to me before)

To enable animated GIFs, select "Internet Options" from the Tools menu and then click the Advanced tab. Scroll down to the Multimedia section, check the "Play Animations" option and click OK. From now on, you should only see the first frame of each animated GIF that loads.

Remember that IE will need to be restarted for the changes to take effect.

Other than that, there's a couple of solutions here: IE7's inanimate gifs.

Does this happen for all animated gifs or only animated gifs loaded in by Javascript? Try going to the url for the gif and seeing if it is animated then. If it is then instead of loading the image into the button, why not load it in HTML, hide it with CSS visibility:hidden and then unhide it with Javascript?

本文标签: javascriptIE7 Animated GIF Appears as a Static ImageStack Overflow