I was combining the ajax form plugin with the ajax validation plugin, which is 
why I need to call ajaxSubmit. I wrote up the details here: 
http://haacked.com/archive/2008/11/21/combining-jquery-form-validation-and-ajax-submission-with-asp.net.aspx

The workaround I did was simply to add a hidden input with the same name as the 
form, but that feels haackish to me. Maybe there's some way I can tunnel the 
button click from validate to ajaxSubmit. Thanks for any advice. :)

Phil

________________________________________
From: jquery-en@googlegroups.com [EMAIL PROTECTED] On Behalf Of Mike Alsup 
[EMAIL PROTECTED]
Sent: Friday, November 21, 2008 3:35 PM
To: jQuery (English)
Subject: [jQuery] Re: Submitting the submit input value

> If I call
> jQuery('form1').ajaxSubmit();
>
> The value sent to the server is foo=bar and not foo=bar&button=click.
>
> Is there an easy way to get this to work? It's needed by my backend
> server.


Use ajaxForm instead of ajaxSubmit and you will get that behavior.
Note that you call ajaxForm once to prepare the form and it will
submit it for you whenever the user decides to submit it.  ajaxSubmit,
on the other hand, submits the form immediately and is typically used
within a submit event handler.

Mike

Reply via email to