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

 

 

参考: 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.

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值