jQuery-File-Upload icon indicating copy to clipboard operation
jQuery-File-Upload copied to clipboard

Jquery file upload doesnt upload file on button click on IE

Open vijendrapatil opened this issue 14 years ago • 1 comments

Hi,

Here is my code,

  <input type="button" id="btnTest" onclick="$('#fileBrowse').click();" value="Upload File" />

   <div id="fileupload">
      <div class="fileupload-buttonbar">
        <label id="fileinputbtn" class="fileinput-button">
        <span>Browse....</span>
        <input id="fileBrowse" type="file" name="files[]" multiple="multiple" />
    </label> 
    <button type="button" class="delete button">
        Delete all files</button>
        <input type="checkbox" id="chkIsPublic" runat="server" /> <span style="font-weight:normal;">Is    Public</span>
        <div class="fileupload-progressbar">
    </div>
  </div>
    <div class="fileupload-content">
    <table class="files">
       </table>
   </div>
   <script id="template-upload" type="text/x-jquery-tmpl">
    <!--Commented Template definition -->
    </script>
    <script id="template-download" type="text/x-jquery-tmpl">
    <!--Commented Template definition -->
   </script>
    </div>

I want. after clicking the "btnTest" button, the fileupload to open the file browse window and start uploading the file on selecting file through file browse window. Its working fine on FireFox and Chrome however, its not working on IE.

The default "Add File" button apears to work properly though on all browsers.

The only issue occurs, when I want to upload file, by clicking on a seperate button, in my example "btnTest". It works on FF and Chrome, the issue occurs only on IE. I am using IE 9.

Please help.

vijendrapatil avatar Mar 14 '12 12:03 vijendrapatil

Please have a look at the FAQ, section "Is it possible to trigger the file selection dialog programmatically?": https://github.com/blueimp/jQuery-File-Upload/wiki/Frequently-Asked-Questions

blueimp avatar Mar 16 '12 06:03 blueimp