有可能你是弹出层 里面显示的上传控件,弹出层是隐藏的。ie9 以下对隐藏的 uploader不能很好的渲染,
所以解决方案就是 ,在你做弹出层动作之前,show出弹出层。问题解决。
或者是少加了参数 runtime
For everyone who has same problem as me:
I had the following HTML
code
<div class="container" style="display:none">
<div>
Logo:
</div>
<div style="clear"></div>
<div id="uploader">
<div id="runtime" class="right">
No runtime was found !
</div>
<div>
<a id="pickfiles" href="#">[Select files]</a>
<a id="uploadfiles" href="#">[Upload files]</a>
</div>
</div>
</div>
The class container
was created as dialog
$(function(){
$(".container").dialog({modal:true, width:400});
});
As we know that DIV
is initial hidden because of dispaly:none
(of course, you can set up autoOpen:false
as a new option in dialog object) and remove the style.
In IE8
(probably in earlier and later version) the uploader cannot be good instantiated if the div
is hidden. (Returns the above error)
In Chrome
and Firefox
(I don't test this issue in Opera
) works fine.
So, my advice is to avoid hidden block (even if you wish to create modal dialog).
I removed the display:none
style and dialog
object from that div and now works very good in IE8
.
Why? I don't know why in IE
, the instance of object is not created at start-up of page, though in Firefox
and Chrome
, the instance was created normally.