I’m using the JQuery Form Plugin (http://jquery.malsup.com/form/) to create an Ajax Form.
I am trying put two submit buttons to handle Form Submit and Form Save operations. I need to submit to two different urls depending on the operation I want to perform: Submit or Save.
I’m not very sure how I can get the value of the actual submit button that was clicked, and then submit the form via AJAX based on this information. I need a little help with this.
For the record, I’m using code syntax similar to what is listed below (this is not the actual code):
// prepare Options Object
var options = {
target: '#divToUpdate',
url: 'comment.php',
success: function() {
alert('Thanks for your comment!');
}
};
// pass options to ajaxForm
$('#myForm').ajaxForm(options);
Thanks
I probably didn’t research this thoroughly before posting. My apologies.
I did this to sort it out (this is a code sample):
Thanks Lalit, I think you were closer to what I needed to do.
Cheers.