title: How can I use window.location.href to download multiple files?
body: <p>I have the following javascript:</p>
  
  <pre><code>function downloadFiles(){
    var files = [];
    files.push('mysite.com/file1.txt');
    files.push('mysite.com/file2.txt');
    files.push('mysite.com/file3.txt');
  
    for(var ii=0; ii&lt;files.length; ii++){
      window.location.href = files[ii];
    }
  }
  </code></pre>
  
  <p>The problem is this only downloads the last file in the list because the first two files get overwritten by the last one.  How can I wait for the user's input on each file before moving on to the next file?</p>