1

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.

7
  • what is your current zk version?
    – chillworld
    Mar 31, 2015 at 8:20
  • Version -: ZK 5.0.5.
    – Ajay jha
    Mar 31, 2015 at 11:03
  • I have tried to use HTML input as well <h:form method="POST" action="upload" enctype="multipart/form-data" > . </br> But its giving me an exception content type is not multipart/form-data. So even if get something to set content type for this particular that can also solve my problem.
    – Ajay jha
    Mar 31, 2015 at 11:04
  • can you reproduce it in zk fiddle?
    – chillworld
    Mar 31, 2015 at 12:44
  • Connection timeout error is coming. And even i havent use jsfiddle. Dont know how to fix. Can you help me how can i send multipart/form-data as request header in zk. SO that i can use HTML file upload option with some modification.
    – Ajay jha
    Mar 31, 2015 at 13:33

3 Answers 3

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

1
  • :) The issue is we need to make it run for IE 9,10 and 11. And we have supported only standard mode with <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "w3.org/TR/html4/frameset.dtd"> And now i am out of solution coz we can't upgrade ZK and we need to support IE11 in standard mode. I have tried other solution to make use of HTML input type but again the issue is on Composer i am not getting multipart/form-data in request. So if i get to know how to supply my custom request to composer instead of ZK that would be also useful.
    – Ajay jha
    Apr 2, 2015 at 6:06
0

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>
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.