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.
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.
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
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
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
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
6 matches
Mail list logo