I have a php script that generate a pdf file. So I have an html page with jquery javascript that do an ajax call at this php script and retrieve the pdf file content. I would that this file will be saved in a lo开发者_Python百科cation choosed by a save file dialog.
How can I do it?
Thank you so much.
You don't need Ajax - just do a
location.href = "fileURL.php";
(or alternatively, have the user click on a link) and if the headers are set correctly, a download dialog will present itself.
精彩评论