If you like the popup SharePoint Uses and wants to implement such in your code here is the code sample that can meet your requirements.
function OpenDocsDialog(url1) {
var options = {
url: url1,
dialogReturnValueCallback: myDialogCallback
};
SP.UI.ModalDialog.showModalDialog(options);
}
function myDialogCallback(dialogResult, data) {
SP.UI.ModalDialog.RefreshPage(dialogResult)
}
Here is how you can call the function :
function OpenPopup1() {
OpenDocsDialog("URL");
return false;
}
If you want to implement it directly here is the sample code:
SP.UI.ModalDialog.showModalDialog({
url: dialogUrl,
allowMaximize: true,
showClose: true,
width: 400,
height: 200,
title: "Pop Up",
dialogReturnValueCallback: RefreshOnDialogClose
});
Subscribe to:
Post Comments (Atom)
SharePoint Server 2016 and 2019 Retirement: What IT Professionals Need to Know
Microsoft SharePoint Server 2016 and 2019 are reaching end of support on July 14, 2026. With the April 2026 feature retirement deadline now ...
-
In last blog we learn how can we enable footer on SharePoint Online Modern Communication site. If you have not gone through that you can use...
-
Code Review :- General 1. Remove the commented code 2. Variable name should not be contain "_". 3. Query should be in separat...
-
Issue : Recently, we had a requirement to sync the calendar between shared mailbox outlook and SharePoint Calendar list. We have created 2 f...
No comments:
Post a Comment