Is there an easy way to make the fileupload work with IE11 without updating zk

夙愿已清 提交于 2019-12-11 11:54:03

问题


In IE11 file upload button of ZK is not working.

I got few replies, It says after updating ZK it will fix the problem.

But we can't update ZK, So in this scenario is there any way to work out this problem any how.


回答1:


If you can't upgrade ZK then you can try to "downgrade" the IE using "X-UA-Compatible" either as meta-tag or as a response header

here an example using the meta tag:

<?meta http-equiv="X-UA-Compatible" content="IE=10" ?>
<zk>
  <fileupload label="upload" onUpload="alert(event.getMedia().getName())"/>
</zk>

and what it looks like in the browser (in the IE dev tools F12 you can check if the meta tag had an effect, you'll see that IE falls back to version 10):

http://screencast.com/t/ftheLA9Ud8




回答2:


Finally I got the Solution. AS IE 11 having problem to attach event for listening to open File chooser. You just manually add the listener.

<button id="browsebtn"  upload="true,maxsize=-1" visible="true" sclass="text">
<attribute w:name="doMouseDown_">
            function (evt) {

            }
            </attribute>
</button>



回答3:


Its simple and weird, However what I found is make the parent component as draggable="true"

<row draggable="true">
    <div style="text-align : right;">
        <label value="Image File:" />
    </div>
    <fileupload id="fileUpload" label="Upload" tooltiptext="Click to upload image file."/>
</row>

Now suddenly you will see your fileupload button in ZK started working correctly for IE11 as well.



来源:https://stackoverflow.com/questions/29346765/is-there-an-easy-way-to-make-the-fileupload-work-with-ie11-without-updating-zk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!