[jQuery] Re: Download a file from server...

2009-01-23 Thread Nicolas R
I also worked around this by using an iframe, and pointing the form's (or anchor's) target attribute to that iframe. Some browsers don't like it when the iframe is set to visibility:hidden or display:none. If you make it position:absolute;height:0;width:0;border:0; it should be ok. Now, I want to

[jQuery] Re: Download a file from server...

2009-01-22 Thread AlexDeLarge
Thank you guys for your answers! I really do appreciate them. As soon as I get back to my problem I'll try some of these suggestions. Once again, thank you.

[jQuery] Re: Download a file from server...

2009-01-22 Thread Mario Soto
In the post above by Alexandre Plennevaux, the link says how to. :) On Jan 22, 9:38 am, Mario Soto wrote: > It must be using http headers: > >         header('Content-Disposition: inline; filename='. > $filename.'.pdf'); >         header('Content-type: application/x-pdf'); >         echo $pdfDat

[jQuery] Re: Download a file from server...

2009-01-22 Thread Mario Soto
It must be using http headers: header('Content-Disposition: inline; filename='. $filename.'.pdf'); header('Content-type: application/x-pdf'); echo $pdfData; die(); By example. - On Jan 22, 3:05 am, Genus Project wrote: > or you can do this. > 1. your php create

[jQuery] Re: Download a file from server...

2009-01-22 Thread Genus Project
or you can do this. 1. your php create the file from your post. 2. return something to the script ($.post) that says you have successfully created the file or maybe with the filepath in it in json or whichever format it is. 3. redirect your current window to the path of this file. But it may

[jQuery] Re: Download a file from server...

2009-01-21 Thread Ricardo Tomasi
You could create a hidden iframe and point it to the file, wouldn't that work? On Jan 22, 5:28 am, Alexandre Plennevaux wrote: > Well, AFAIK It HAS to be triggered by a click event on a A anchor, so, > just make sure your onclick handler returns true. > > For the "force download" functionality,

[jQuery] Re: Download a file from server...

2009-01-21 Thread Alexandre Plennevaux
Well, AFAIK It HAS to be triggered by a click event on a A anchor, so, just make sure your onclick handler returns true. For the "force download" functionality, this writeup of mine might help you: http://www.pixeline.be/blog/2009/php-force-download-script-convert-url-to-localpath/ On Thu, J

[jQuery] Re: Download a file from server...

2009-01-21 Thread MorningZ
You don't want AJAX in this situation have the page post like normal and do what you lay out above... AJAX is *not* the solution to every problem On Jan 21, 6:46 pm, AlexDeLarge wrote: > Hi, > > I have situation like this: I post certain data with $.post to PHP- > script which is supposed t