jquery - IE9 Form submits after mutiple click -


i have simple html form not submitting in ie9. works in chrome, ff, , ie10.

steps:

  1. click on "add files" button
  2. add multiple files.
  3. follow step 1 , step 2 (twice)
  4. click submit

if click "submit" load same page.

it's working on chrome, ff , ie10. in ie9 need click "submit" button multiple times based on how many times clicked "add files" button.

anyone can me identify wrong ? here form:

demo link

code:

form:

<form id="edit-object-form" name="multipleupload" class="main-form" action="" method="post" enctype="multipart/form-data" >     <input type="button" id="add-file-field" name="add" value="add files" />                 <div id="inputswrapper"></div>             <input type="submit" class="regular-btn-red submit_button" value="submit query" id="submit" />     </form> 

js:

$(function() { var inputswrapper   = $("#inputswrapper"); //input file wrapper id var addbutton       = $("#add-file-field"); //add button id  var fieldcount=1; //to keep track of input file added  // add browse button $(addbutton).click(function (e)  //on add input button click {             fieldcount++; //text box added increment             //add input box <label for="myfile">** label **</label><br/>             $(inputswrapper).append('<input class="custom_input" type="file" name="file[]" multiple id="multiupload'+fieldcount+'">');             document.getelementbyid("multiupload"+fieldcount).click(); return false; }); })(jquery);  


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -