Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Reload or Refresh a page after Closing the SharePoint 2013 Online Modal Popup Dialog
WhatsApp
Vijai Anand Ramalingam
Jun 09
2015
8.2
k
0
0
<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
Up Next
How to Reload or Refresh a page after Closing the SharePoint 2013 Online Modal Popup Dialog