I need to close my custom form (which I show in modal dialog) and stop the parent site from refreshing.
I call my closing function from custom "Cancel" button on click.
customClose() {
//some code here
window.frameElement.cancelPopUp();
}
<input type="button" value="Cancel" onclick="javascript:customClose()" />
But if I close my dialog this way, it refreshes the parent site. How can I close it without refreshing?
P.S. It's a SharePoint modal dialog.
NOTE: I can't use jQuery for this, need pure js.