I have jQuery UI confirm dialog:
function fnComfirm(title, content) {
$(\"#dialog:ui-dialog\").dialog(\"destroy\");
$(\"#dialog-confirm p\").html(con
The returns is in the context of ok and cancel buttons in a nested function you can try call backs:
function fnComfirm(title, content,onSusses,onCancel) {
$("#dialog:ui-dialog").dialog("destroy");
$("#dialog-confirm p").html(content);
$("#dialog-confirm").dialog({
title: title,
resizable: false,
height: 200,
width: 486,
modal: true,
buttons: {
"OK": function() {
$( this ).dialog("close");
onSusses();
},
Cancel: function() {
$( this ).dialog("close");
onCancel();
}
}
});
}
and call then
fnComfirm(title,content,function(){alert('Ok')},function(){alert('cancel');}})