在回发更新进度gif动画停止 [英] Update Progress animated gif stops on postback
问题描述
我已经使用了AJAX的更新进度控制,显示动画GIF回发时发生。
I have used ajax update progress control that shows the animated gif when postback happens.
问题:它显示了一段时间,但随后停止refershing(或者更确切地说,停止播放/ revoloving)。可能是什么的一样,实际的原因是什么?
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?
请指教!谢谢!
推荐答案
为.gif的动画将停止回发与Internet Explorer。问题是固有的Internet Explorer。显然,这个问题去所有的方式回到IE 6(虽然我只证实,在IE8)。
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).
有它周围的黑客工具,这是通过更新它的源时的setTimeout
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);
您也可以使用jQuery的动画图形。这在IE浏览器,但现在我发现,Chrome不通过回发的动画工作的所有道路。总有一些东西是不存在的? ...:(
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? ... :(
这篇关于在回发更新进度gif动画停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!