[jQuery] Re: jQuery AJAX Dynamic File Download

2008-03-06 Thread Patrik Nikkanen
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;

[jQuery] Re: jQuery AJAX Dynamic File Download

2008-03-06 Thread h0tzen
no, do a window.open() on the excel.php-url ... XHR is not meant to involve user-interaction (open/save) on unknown mime-types.

[jQuery] Re: jQuery AJAX Dynamic File Download

2008-03-06 Thread tlphipps
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