P: fileUpload loads forever in IE9 after clicking the download button

I have the code below. But I don’t know why in my computer IE9, it shows that at boot press the download button. But it works on chrome and firefox.

<p:fileUpload  id="fileUpload1s1"
               process="@form"
               label="Browse" 
               multiple="false"
               fileUploadListener="#{DataController.uploadataFile}"                                               
               mode="advanced"
               showButtons="false"
               auto="false"                                               
               sizeLimit="4000000"
               allowTypes="/(\.|\/)(txt)$/"
               required="true"> 
</p:fileUpload>
+4
source share
1 answer

I have a button to control the download, as shown below, in the action of the download button. did not use the download button inside the file upload control.

function clickUpload() {
                var b = $(PrimeFaces.escapeClientId("form1:excelUpload")+" .ui-fileupload-preview").length;

                if(b==0)
                    edis.showErrorMsg("Please select an Text File to upload");
                else {
                    $(PrimeFaces.escapeClientId("form1:excelUpload")+" .ui-fileupload-upload")[0].click();
                }
            }
0
source

Source: https://habr.com/ru/post/1614529/


All Articles