title: Trigger click on input=file on asynchronous ajax done()
body: <p>I have a form with some data and upload. The upload could be initiated only if data were successfully received and processed. To do that, I make an ajax call where I </p>
  
  <ol>
  <li>send data, </li>
  <li>check its result, </li>
  <li>trigger a click() to open a file dialog box. </li>
  </ol>
  
  <p>The last thing with click() doesn't work as it seems that <strong>asynchronous call blocks opening an upload window</strong>. It works only if I set <code>async: false</code>.</p>
  
  <p>I cannot find anything in documentation and this site and want to know what is the problem there and how to make it working keeping the call asynchronous?</p>
  
  <p>Example:</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "/Save",
      data: jsonText,
      dataType: "json",
      //async: false            [1]
  }).done(function (msg) {    
      $("#upload").click();   
  });
  
  //$("#upload").click();       [2]
  </code></pre>
  
  <p>Demo: <a href="http://jsfiddle.net/c2v00uxn/">http://jsfiddle.net/c2v00uxn/</a></p>
  
  <p>Note: </p>
  
  <ul>
  <li>if I uncomment [1] or [2], it does work (the file dialog appears as expected).</li>
  <li>replace click() with trigger('click') doesn't work</li>
  <li>replace click() with live()/on() doesn't help </li>
  <li>file upload control is visible as per example (so it's not because of hidden control)</li>
  <li>timeout settings for ajax do not help.</li>
  </ul>
  
  <p><strong>UPDATE</strong> </p>
  
  <p>It's not about how to make a "click" in general, it's about how to click after an asynchronous ajax call (as of now, works only with non-asynchronous call).</p>