iframes are generally the approach used

On 3/15/06, Ryan Gahl <[EMAIL PROTECTED]> wrote:
> Downloading is a function of the browser itself, not supported in the
> XMLHTTP object (you either get text or XML with it)...
>
> The only way I can think to initiate a file download without tying up
> your client instance, is to spawn a tiny popup window which initiates
> the download. But... that's a popup. Maybe it can be done with an
> iFrame?
>
> But no, definitely not with XMLHTTP (unless I am just WAY wrong)...
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Ian
> Tyndall
> Sent: Wednesday, March 15, 2006 2:43 PM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: [Rails-spinoffs] Ajax request for file downloads
>
> 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';
>
>
>
> But as you know, this ties up the browser and gives me little control of
>
> the download.
>
> Any thoughts/experiences would greatly be appreciated!
>
> Ian Tyndall
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
> The information transmitted in this electronic mail is intended only for the
> person or entity to which it is addressed and may contain confidential,
> proprietary, and/or privileged material.  Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended recipient
> is prohibited. If you received this in error, please contact the sender and
> delete the material from all computers.
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to