I would set these headers in the excel.php script, and create a link
directly to it. It is more or less a straight file download, created
dynamically.
header(Cache-Control: no-cache);
header('Content-Type: application/octet-stream');
header(Content-Disposition: attachment;
no, do a window.open() on the excel.php-url ...
XHR is not meant to involve user-interaction (open/save) on unknown
mime-types.
I second this. There's no need to do AJAX here. Just linking
directly to the PHP page with these headers will prompt for download
and NOT refresh the browser. (It will look like AJAX)
On Mar 6, 2:25 am, Patrik Nikkanen [EMAIL PROTECTED] wrote:
I would set these headers in the excel.php
3 matches
Mail list logo