The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End php download multiple files problem. Reply To: php download multiple files problem.


No problem. I wasn’t thinking very clearly in my earlier answer. Ajax can request the URL, but it has no way of handling the download (the browser must do that). There are two general approaches (both of which can be managed via javascript).

  • open a new window with the download URL. This is very easy and reliable, but can get tripped up by popup blockers.
  • set the download URL as the src in an iframe on the page.

I’ve done the second but not in some time. I remember it worked well. I’ll do a refresher and let you know tomorrow. IIRC, your PHP script won’t need to change.