views:

244

answers:

2

Hello 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

+5  A: 

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.

Kyle Sevenoaks
OMG, You are right! I can't believe that setting exists. Thank you Kyle! :)
Abs
No problem, glad it worked for you :)
Kyle Sevenoaks
A: 

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?

Rupert