Hi,
I have open a modal dialog. When a user click on the "Cancel" button the dialog close which fires the dialog closing event. But when user click on the "Ok" button, dialog remains opens and does not close. Please have a look to my code below,
function openModalPopupAndAdd(gridControlName) {
var options = SP.UI.$create_DialogOptions();
options.url = "/_layouts/AssetEditHyperLink.aspx";
options.width = 750;
options.height = 750;
options.dialogReturnValueCallback = Function.createDelegate(null, modalReturnValue);
SP.UI.ModalDialog.showModalDialog(options);
return false;
}
function modalReturnValue(dialogResult, returnValue) {
if (dialogResult == SP.UI.DialogResult.OK) {
alert(dialogResult);
}
else if (dialogResult == SP.UI.DialogResult.cancel) {
alert(dialogResult);
}
}
Thanks in advance.
Regards,