I'm using the SPServices jQuery library to update a list which is working fine.

note: This problem may have absolutely nothing to do with SPServices; I'll have to try using the jQuery ajax method directly to see if that can overcome the problem I'm encountering

At any rate, I added an IMG tag (for an ajax loader gif) to the page with a style attribute (visibility:hidden), and added event handlers for 2 jQuery ajax events: ajaxStart (to show() the image) and ajaxStop (to hide() the image).

It works fine in Firefox but in IE 8 the image is never displayed. I put alerts in the ajaxStart and ajaxStop event handlers to confirm they fire, and they do.

I also tried a using a plain non-animated gif, but the results were the same: works fine in Firefox but nothing is ever displayed in IE 8.

As I said, I might try using the jQuery ajax method directly and maybe put the code to show and hide the image in the beforeSend and complete arguments; I don't think there is a way to do this with SPServices because there is no way (that I know of at least) to add something to the beforeSend when using SPServices.

At any rate, that's the problem. Thanks!!


My approach is typically to display the loading graphic initially, then hide it on the completefunc call of SPServices. You may want to post this on the SPServices forum if you haven't (I didn't check), but there should be some examples floating around in the discussions that show people doing this.

  • In looking around some more, I think I forgot to try setting async to true; I generally set it to false, but when doing something like this maybe it needs to run asynchronously in order for it to work in IE. I'll also try your suggestion. – user815460 Sep 24 '11 at 1:45
  • Yes, your asynchronous flag should make a difference here too. – webdes03 Sep 26 '11 at 18:30

In order for my animated image to work in IE, I had to set a timeout (using jQuery).

setTimeout("image_id.src = image_id.src", 100);

where image_id is the id of my animated image.

<img id="image_id" src="~/_layouts/styles/animatedImages/activity.gif" alt="" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.