0

Sorry if my question is unclear, it's hard for me to explain.

Basicaly I want this:

<a href="the_other_webpage" download>download file</a>

to download the file this webpage automatically downloads:

html:

<a id="download" href="download_file_url" download hidden></a>

javascript:

document.getElementById('download').click();
Anik Islam Abhi
  • 25,137
  • 8
  • 58
  • 80
Triforcey
  • 453
  • 5
  • 10
  • I guess this is impossible. You can do this in PHP, though. See [this post](http://stackoverflow.com/questions/7263923/how-to-force-file-download-with-php). – Jamie Jul 07 '15 at 02:23
  • 1
    you need to name a file in the `download` attrib, then click will work: http://pagedemos.com/yp6rtseyjae5/ – dandavis Jul 07 '15 at 02:23

0 Answers0