[jQuery] Re: Form plugin and attaching extra stuff to query string

2008-03-06 Thread Mike Alsup
Is there a better way to add this extra parameter without having add an element to the DOM like this? The better way is to have the server detect that the request was submitted via ajax and respond accordingly. You can determine this on the server by inspecting the X-Requested-With header.

[jQuery] Re: Form plugin and attaching extra stuff to query string

2008-03-06 Thread Mike Alsup
Is that just because it's jQuery or does that apply in general to all browsers doing AJAX? It's a technique used by all the major JavaScript libraries.

[jQuery] Re: Form plugin and attaching extra stuff to query string

2008-03-06 Thread Ariel Flesler
You could also push more info into the data array, using the 'beforeSubmit' right ? Although, is Mike's option is a possibility, that's always cleaner. Cheers Ariel Flesler On 6 mar, 10:52, Mike Alsup [EMAIL PROTECTED] wrote:  Is there a better way to add this extra parameter without having

[jQuery] Re: Form plugin and attaching extra stuff to query string

2008-03-06 Thread Peter Bengtsson
On 06/03/2008, Mike Alsup [EMAIL PROTECTED] wrote: Is that just because it's jQuery or does that apply in general to all browsers doing AJAX? It's a technique used by all the major JavaScript libraries. Thanks a lot! I didn't know that. -- Peter Bengtsson, work www.fry-it.com home

[jQuery] Re: Form plugin and attaching extra stuff to query string

2008-03-06 Thread Peter Bengtsson
On 06/03/2008, Mike Alsup [EMAIL PROTECTED] wrote: Is there a better way to add this extra parameter without having add an element to the DOM like this? The better way is to have the server detect that the request was submitted via ajax and respond accordingly. You can determine

[jQuery] Re: Form plugin and attaching extra stuff to query string

2008-03-06 Thread Mike Alsup
You could also push more info into the data array, using the 'beforeSubmit' right ? Although, is Mike's option is a possibility, that's always cleaner. You can add extra data in the beforeSubmit handler, or more conveniently, in the plugin fn: $('#myForm').ajaxForm({ // use data prop