您的位置:首页 > 其它

ie 9 ie8 plupload 上传按钮问题 处理

2015-05-15 18:10 197 查看
参考: http://stackoverflow.com/questions/21014586/plupload-does-not-seem-to-be-uploading-files-in-ie-9-it-works-in-other-browsers
有可能你是弹出层 里面显示的上传控件,弹出层是隐藏的。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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: