由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Gif animation stops when clicking a link.
相关主题
问一下关于load image的servletA question
Re: Why Swing is not multiple-thread safe?How can I alert a spring message?
hwo to insert vedio into Java applet库存查询应该怎么做?
一个基本问题。java网站写好,如何提速? (转载)
Sun 的applet warning for each new window害死我了大妈求建议(拜谢!)
如何做这样的AnimationRe: 请教一个问题...
javascript or jstl?Re: [转载] create gif/png image in C or ja
再论abstract classRe: How to distinguish Mouse Right-click and left-cl
相关话题的讨论汇总
话题: ie话题: settimeout话题: waitimg话题: animation话题: gif
进入Java版参与讨论
1 (共1页)
g*****g
发帖数: 34805
1
I have links which will take a while to open,
so to improve user experience, we try to show a progress bar.
Unfortunately, when you click one a link, browser stops the
animation during loading, anyway to get around it.
http://209.204.217.171/script/1751.htm
I tried the trick here, didn't work.
A**o
发帖数: 1550
2
do not flush out your response until it's all ready? my guess.

【在 g*****g 的大作中提到】
: I have links which will take a while to open,
: so to improve user experience, we try to show a progress bar.
: Unfortunately, when you click one a link, browser stops the
: animation during loading, anyway to get around it.
: http://209.204.217.171/script/1751.htm
: I tried the trick here, didn't work.

g*****g
发帖数: 34805
3
nah, it's all client side browser behavior, nothing to do with server.

【在 A**o 的大作中提到】
: do not flush out your response until it's all ready? my guess.
m******t
发帖数: 2416
4
Did you try linking to the animated gif in an iframe?
Also, sites like expedia show progress bars alone on an intermediate page.
That would work around this issue.
m******t
发帖数: 2416
5
Or use ajax to request the next page in background while the gif animates?
That'll very likely work, but sounds like an overkill to me.
g*****g
发帖数: 34805
6
function waitmessage() {
setTimeout('document.getElementById("divHidden").style.display="block";',1);
setTimeout('document.getElementById("waitImg").src = "pleasewait.gif"', 1);
location.href = "some url";
}
try something like this, now IE7 works fine, but firefox stops animation.
Funny thing is, if the image is not dynamically showed in script, the result
is exactly opposite.
Thanks for the suggestion.

【在 m******t 的大作中提到】
: Did you try linking to the animated gif in an iframe?
: Also, sites like expedia show progress bars alone on an intermediate page.
: That would work around this issue.

g*****g
发帖数: 34805
7
finally get it running, this is my test code
thanks to stupid IE