[jQuery] Download a file from server...
Hi,
I have situation like this: I post certain data with $.post to PHP-
script which is supposed to handle the data, create a file from it and
then trigger browser to open a Save As-dialog. Everything works just
fine except the Save As-dialog, I just can't make it pop-up.
For the Save As dialog the PHP-script ha s following statements:
header('Content-disposition: attachment; filename=stats.txt');
header('Content-type: text/plain');
readfile('stats.txt');
And this just doesn't work through $.post, or at least I can't make it
happen.
Is there any way to make this work?