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.


Well now I can send to the php script using :

var request = new XMLHttpRequest();"HEAD","http://www.thephpscript") // ,false); // false = wait for reply.

and I can see network traffic but the php scripts still not working even when hard coding the zip filenames.

Why isn’t this working?
Javascript should be executing the php scripts and not expecting the binary data to come back to it.
The only thing javascript gets now is the headers, not the content so wth?

So is it possible to have javascript trigger another way like a hidden form/submit to execute my php scripts?
If so then I should be able to:
1. Have javascript send the selected images to the zipping php script.
2. When finished the php script sends back the zipped filename triggering javascript to
3. then trigger the hidden form/submit which executes the download php script.

Is iframe the way EVERYBODY does downloads?
I guess if I must use that it’s not so bad now because my files are zipped into one zip file.

I gotta say the internet is poorly designed. A mixed soup of varying technologies which still don’t work very well.