I have multiple forms on a page, for each of them I want the user to confirm before form submission. but when the user confirms to submit, how do I let this dialog know whic
Based on Nick Craver his answer, you can write it this way:
$('.allForms').submit(function(){
currentForm = this;
$('#dialog-confirm').dialog({
resizable: false,
height:140,
modal: true,
buttons: {
'Confirm submit': function() {
currentForm.submit();
},
Cancel: function() {
$(this).dialog('close');
}
}
});
return false;
});