Home › Forums › Back End › php download multiple files problem. › Reply To: php download multiple files problem.
September 20, 2014 at 8:43 pm
#183725
__
Participant
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.