JQuery Form Plugin with multiple submit buttons -
I am using the JQuery form plugin () to create an Ajax form.
I am trying to submit two submit buttons to handle form submit and save form operations. Based on the operation I need to submit two different URLs: Submit or Save.
I'm not sure how I can get the value of the actual submit button, and clicked, and then submit the form via AJAX based on this information. I need a little help with this.
For the record, I am using code syntax similar to the version below (this is not the actual code):
// Create Options Option Option Var == {Target: '#divToUpdate', url: 'comment.php', Success: Work () {Warning ('Thank you for your comment!'); }}; // Pass the AJAX form pass $ ('# myForm'). Alexfarm (option);
thanks
Maybe I did not research well before Done posting. Pardon.
I resolved it (this is a code sample):
var $ _ = jQuery; $ _ (Document) .ready (function () {$ _ ("# id_submitbutton_1"). Click (function () {$ _ ("# form_id"). Ajaxform (options_1);}); $ _ ("# Id_submitbutton_2 "). (Function () {$ _ (" # form_id "). AjaxForm (options_2);});});
Thank you, Fine, I think you were close to what you wanted to do.
Cheers.
Comments
Post a Comment