title: jQuery submit event stops form from submitting in IE9
body: <p>I am trying to add some validation to a form just before it is submitted. Here is what I am using:</p>
  
  <pre><code>$('#add_upload').submit(function(e){
  
      var file = $('#realupload_1').val();
      var p_name = $('#p_name').val();
      var p_price = $('#p_price').val();
      var thumb = $('#realupload_2').val();
      var p_desc = $('#p_desc').val();
  
      if(file == ''){
          e.preventDefault();
          alert('Please select a valid product file');
      }else if(p_name == '' || p_name == 'ebook name'){
          e.preventDefault();
          alert('Please set a valid product name');
      }else if(p_price == '0.00' || Math.ceil(p_price) == 0){
          e.preventDefault();
          alert('Please set a valid price for your product');
      }else if(thumb == ''){
          alert('Please select a valid product image for your product');
          e.preventDefault();
      }else if(p_desc == '' || p_desc == 'Description...'){
          e.preventDefault();
          alert('Please add a description for your product');
      }else{
          //$('#submita').attr("disabled","disabled").val("Please wait....");
      }
  
  });
  </code></pre>
  
  <p>The above works perfectly on Firefox and Chrome. However, I am having issues with IE9 - it gets to the else statement but it doesn't submit the form! Once I press submit button again, it asks me to make sure my upload file field isn't empty! I' m not sure how it is clearing the value.</p>
  
  <p>When I remove the above validation, the form submits fine. However, I need to validate first.</p>
  
  <p>What I have tried:</p>
  
  <ol>
  <li>I have made sure form IDs are all unique</li>
  <li>I have made sure to name my submit button ID to something other "submit"</li>
  <li>I have added $('#add_upload').submit(); in the else field.</li>
  </ol>
  
  <p>The above didn't make any difference.</p>
  
  <p>I really appreciate help here as I have wasted 2 hours on this!</p>
  
  <p>My problem is similar to <a href="https://stackoverflow.com/questions/7513211/clicking-submit-clears-file-field-instead-of-submitting-the-form-ie9">this question</a> but no definitive answer yet.</p>
  
  <p><a href="http://pastebin.com/c1QJjBnp" rel="nofollow noreferrer">Here is the HTML</a> if it helps.</p>
  
  <h2>Update</h2>
  
  <p>Well, I've narrowed the issue to this problem JS code:</p>
  
  <pre><code>$('#file_upload_1').click(function(){
  
      $('#realupload_1').trigger('click');
  
  });
  </code></pre>
  
  <p>As you can see I am triggering a click to open the file dialog box. IE9 doesn't seem to like this, it must be a security issue where a form won't submit if the file input was triggered automatically.</p>
  
  <p>Can anyone confirm this?</p>