title: IFRAME callback after download completes?
body: <p>Good morning!</p>
  
  <p>I have a java servlet which receives a list of parameters and generates a PDF file for me.</p>
  
  <p>Something like:</p>
  
  <pre><code>http://url/download/file?id=123&amp;ext=pdf
  </code></pre>
  
  <p>When I access that URL within my browser window, the file is downloaded. </p>
  
  <p>The problem is that I need to download the file in a hidden iframe, and notify the user when the download completes.</p>
  
  <p>Downloading the file is easy:</p>
  
  <pre><code>var iframe = $('&lt;iframe/&gt;', {
                          src:   formURL+'&amp;'+formData+'&amp;docList='+inputDocList.val()
                      });
  $('body').append(iframe);
  </code></pre>
  
  <p>Iframe is appended to the body and the download starts. I need to know when the download ends. I already tried using jquery's load event:</p>
  
  <pre><code>iframe.load(...)
  </code></pre>
  
  <p>but it wont trigger when my download finishes. I also tried inspecting the DOM of the iframe before and after the download completes, and it appears to be the same.</p>
  
  <p>Is there a way to do this? I need a callback!</p>
  
  <p>Thank you guys.</p>