Submitting UI Dialog with a particular submit button

Submitting UI Dialog with a particular submit button

I currently open UI dialog using the following function.

jQuery("#Delete").click(function() {
           jQuery("#dialog").dialog("open");
           return false;
        });



My buttons definition for UI dialog
   buttons: {
                     'Delete': function() {
                         jQuery("#form")[0].submit();
                         jQuery(this).dialog('close');
                     },
                     Cancel: function() {
                         jQuery(this).dialog('close');
                     }
                 }


My form has multiple submit buttons which drive different actions(Add, Edit, Delete). Normally, I would use .click() function on a particular button but here I am already binding .click() to display dialog.

I am trying to figure out how to submit using a particular submit button?

Anyone come across this situation?