Ian Tyndall wrote:
> I'm not sure if this has been discussed before, but is it possible to
> get a file download as a response from Ajax.Request?  I know you can
> have response txt or xml, but how would I go about requesting a file
> download? Currently I'm requesting the download like this:
>         window.location =
> 'http://www.mysite.com/pdf_reports.php?id=1&mnt=05&yr=2005';

If the server delivers that with the http header

Content-Type: application/binary

then you should get the browser behavior you're looking for.

If, instead you have

Content-Type: text/html
or
Content-Type: text/plain

or something else the browser is prepared to render, then it
will render the page.

-- 
Raul
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to