title: Start multiple downloads and get feedback when download prompt window showed
body: <p>I'm currently writing a little program that generates an html file and opens it with the default browser to start multiple downloads.<br>
  I don't want to open a tab/window for every download, so creating hidden iframes for the downloads seemed like a good solution.<br>
  I'm using <code>onload</code> on the iframes to find out if the download prompts for each download have shown up yet. This approach seems to be very unreliable in the Internet Explorer though. </p>
  
  <p>So I'm wondering if there is there a way to fix this or maybe a better approach?<br>
  (Without libraries please.)</p>
  
  <p>Here is my html/js code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;!-- saved from url=(0016)http://localhost --&gt;
  &lt;html&gt;&lt;head&gt;
    &lt;meta content="text/html;charset=utf-8" http-equiv="Content-Type"&gt;
    &lt;meta content="utf-8" http-equiv="encoding"&gt;
    &lt;title&gt;Downloads&lt;/title&gt;
    &lt;script&gt;
      "use strict";
      var downloadsInfo = {
          "http://download-installer.cdn.mozilla.net/pub/firefox/releases/26.0/win32/en-US/Firefox%20Setup%2026.0.exe":"Status: Connecting",
          "http://download.piriform.com/ccsetup410.exe":"Status: Connecting"
      };
      var i = 0;
      var iv = setInterval(function() {
          i = ++i % 4;
          var j = 0;
          var finished = true;
          for (var key in downloadsInfo) {
              var value = downloadsInfo[key];
              if (value != "Status: Download Started!") {
                  value = value+Array(i+1).join(".");
                  finished = false;
              }
              document.getElementsByTagName("div")[j].innerHTML = key+"&lt;br/&gt;"+value;
              j = j+1;
          }
          if (finished) {
              alert('Done! You can close this window/tab now.');
              clearInterval(iv);
          }
      }, 800);
    &lt;/script&gt;
  &lt;/head&gt;&lt;body&gt;
    &lt;h3&gt;Please wait for your downloads to start and do not reload this site.&lt;/h3&gt;
    &lt;div&gt;&lt;/div&gt; &lt;br/&gt;&lt;br/&gt;
    &lt;div&gt;&lt;/div&gt; &lt;br/&gt;&lt;br/&gt;
    &lt;iframe src="http://download-installer.cdn.mozilla.net/pub/firefox/releases/26.0/win32/en-US/Firefox%20Setup%2026.0.exe" onload="downloadsInfo['http://download-installer.cdn.mozilla.net/pub/firefox/releases/26.0/win32/en-US/Firefox%20Setup%2026.0.exe'] = 'Status: Download Started!';" style="display:none"&gt;&lt;/iframe&gt;
    &lt;iframe src="http://download.piriform.com/ccsetup410.exe" onload="downloadsInfo['http://download.piriform.com/ccsetup410.exe'] = 'Status: Download Started!';" style="display:none"&gt;&lt;/iframe&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>