Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update Progress animated gif stops on postback

I have used ajax update progress control that shows the animated gif when postback happens.

Problem: It displays for a while but then it stops refershing (or rather, stops playing/revoloving). What could be the actual cause of the same?

Please advice!. Thanks!

like image 787
xorpower Avatar asked Dec 27 '22 15:12

xorpower


1 Answers

The animation of a .gif will stop on PostBack with Internet Explorer. The problem is inherent to Internet Explorer. Apparently this issue goes all the way back to IE 6 (though I've only confirmed it in IE8).

There is a little hack around it, and that's by updating it's source with a setTimeout

function UpdateImg(ctrl) {
var img = document.getElementById(ctrl);
img.src = img.src;
}

setTimeout(function() { UpdateImg('image1'); }, 50);

You could also use jQuery to animate a graphic. This works in IE, but now I notice that Chrome doesn't work all the way through the animations on PostBack. There's always something isn't there? ... :(

like image 146
Jourdan Avatar answered Jan 10 '23 19:01

Jourdan