TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Reload or Refresh a page after Closing the SharePoint 2013 Online Modal Popup Dialog
Vijai Anand Ramalingam
Jun 09
2015
Code
8
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
<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>
SharePoint 2013
Modal Popup
Modal Dialog