<script type="text/javascript">
// Using the DialogOptions class
function OpenDialog(strPageURL) {
var dialogOptions = SP.UI.$create_DialogOptions();
dialogOptions.url = strPageURL; // URL of the Page
// Width of the Dialog
dialogOptions.width = 800;
// Height of the Dialog
dialogOptions.height = 630;
// Function to capture dialog closed event
//dialogReturnValueCallback - A function pointer that specifies the return callback function. The function takes two parameters, a dialogResult of type SP.UI.DialogResult Enumeration and a returnValue of type object that contains any data returned by the dialog.
dialogOptions.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
// Open the Dialog
SP.UI.ModalDialog.showModalDialog(dialogOptions);
return false;
}
// Dialog close event capture function
function CloseCallback(strReturnValue, target) {
location.reload(true);
}</script>
<div>
<a onclick="return OpenDialog('https://c986.sharepoint.com/Lists/Parent/NewForm.aspx');"
href="https://c986.sharepoint.com/Lists/Parent/NewForm.aspx">Click here to show
Modal Dialog</a></div>Reload or refresh a page after closing the SharePoint 2013 Online Modal Popup Dialog.
