title: Download a file and redirect...or alternative
body: <p>Users fill out a form.  With a valid form, they click to download a file.  I would like to be able to redirect them to another page (e.g., <code>page2.html</code>) AND initiate a download.  </p>
  
  <p>I can't initiate download on <code>page2.html</code> because most browsers will flag security warnings if a download link isn't directly clicked on.</p>
  
  <p>How is something like this accomplished using javascript or jquery?  Obviously the following doesn't work but it's meant for illustrative purposes:</p>
  
  <pre><code>document.getElementById("foo").onclick = function(){
       window.location = "/download.exe";
       window.location = "/page2.html";
  }
  </code></pre>