I\'m using jQuery UI dialog. I have a delete form as follows:
@using (Ajax.BeginForm(\"DeleteUser\", \"Administrator\", new { id = Model }, new AjaxOptions {
A trick. This is my first post, i spend a lot of time to resolve this question, i think that this is easier:
dialog:
function smOpenConfirmDialog(callBack) {
$("#noticeDialog").dialog({
autoOpen: true,
modal: true,
autoOpen: false,
draggable: false,
buttons: {
"Confirm": function () {
callBack();
$(this).dialog("close");
},
"Cancel": function () {
$(this).dialog("close");
}
}
});
and
$("input:submit").click(function (e) {
smOpenConfirmDialog(function () {
$("form").trigger('submit');
});
e.preventDefault();
});