I have created a dialog with the following code:
function Dialog() {
var options = {
url: 'http://mysite/mypage.aspx',
title: 'My Title',
allowMaximize: false,
showClose: true,
width: 400,
height: 350,
dialogReturnValueCallback: RefreshOnDialogClose
};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
this dialog works good and after i click save it refreshes the page, but if i click close or cancel it refreshes the page again.
So I want only when the save button is clicked to refresh page, not when close or cancel is pressed.
Thanks