As subject, when the form is submitted (file upload) i display an progress bar image (hidden image becomes visible), but the image is not animated.
After some googling it seems that ie stops animating the gifs when a request is sent. So what is the workaround? thanks. here is the code (unecessary html code removed):
<div id="uploadprogressbar" style="display:none"><img src="images/progressbar.gif"></tr> <input name="filename" type="file" /> <input type="submit" name="upload" value="Upload Image" onClick="document.getElementById('uploadprogressbar').style.display='';" /> 这问题要怎么解决啊?这是老外的回答:
You could try a workaround with the proprietary ie onbeforeunload attribute - this may let the gif remain animated in ie. I haven't tested this, however. :)
An example on the body element would be: <body onbeforeunload="document.getElementById('uploadprogressbar').style.display='';">
onbeforeunload 这方法还是不行。。 求助?
After some googling it seems that ie stops animating the gifs when a request is sent. So what is the workaround? thanks. here is the code (unecessary html code removed):
<div id="uploadprogressbar" style="display:none"><img src="images/progressbar.gif"></tr> <input name="filename" type="file" /> <input type="submit" name="upload" value="Upload Image" onClick="document.getElementById('uploadprogressbar').style.display='';" /> 这问题要怎么解决啊?这是老外的回答:
You could try a workaround with the proprietary ie onbeforeunload attribute - this may let the gif remain animated in ie. I haven't tested this, however. :)
An example on the body element would be: <body onbeforeunload="document.getElementById('uploadprogressbar').style.display='';">
onbeforeunload 这方法还是不行。。 求助?
类似于
var img = document.createElement("img");
img.src = "images/progressbar.gif";
document.getElementById("divid").appendChild(img);
PS:什么时候我的英语能让我去外国论坛问问题就好了……