Hi Max,

Using Form#request with a form performs an Ajax.Request, using the
inputs of the form as serialized parameters.
This might not bring you the behavior you expect to have.

Maybe if you simply do a flat form submit, using $
('form_pdf').submit(); with all its inputs(hidden, text, ...) pre-
filled:


<form id="form_pdf" action="/any/url/">
<input type="hidden" name="param1" value="anything">
<input type="hidden" name="param2" value="anything">
...
</form>


hope it helps,

-Laurent


On Oct 9, 3:14 pm, spectrus <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am trying to submit a form that calls PHP which generates a PDF file
> and shoots it back to the user. When I do it using GET directly in the
> browser address bar it works. However when I submit the form with
> Prototype (either POST or GET) it doesn't:
>
> $('form_pdf').request({ parameters: params });
>
> I see the response headers in firebug set correctly as '        application/x-
> download' (which are set in the back-end). Furthermore, the response
> tab in the firebug console shows the actual contents of the PDF file
> (flat-text gibberish).
>
> It must be something trivial, perhaps setting some parameter for the
> request method. Does Prototype somehow override the headers when it
> receives responses to its AJAX requests?
>
> If anyone has ever dealt with a similar issue, any pointers are
> greatly appreciated.
>
> Regards,
> Max
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to