On Wed, Feb 4, 2009 at 23:08, joe t. <thooke...@gmail.com> wrote: > > i've had an ongoing need to make Form#request less dependent on the > FORM's action attribute.
The sole purpose of Form#request is to wrap an Ajax.Request call to make it use the form's "action" and "method" attributes. In short, it completely simulates (with the exception of file uploads) the way a web browser would serialize and submit a form. If you find yourself wanting another action URL or HTTP method, you definitely *don't want* to use Form#request. A much better solution is manually using Ajax.Request + Form#serialize (as you already mentioned). I strongly advise against the writeAttribute hack. Form#request was designed to support unobtrusive scripting by hijacking form submits; and by using this hack you're defying the purpose of Form#request as well as making your scripts obtrusive (by changing the "action" attribute unnecessarily). You are encouraged to use Element.addMethods to add a new method like Form#requestWithAction(url, options). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---