Most come requirement in Sharepoint custom developemt is to have a popup .This can be achieved by using the Modal PopUp .Below is the code script which gives us popup in sharepoint
You can use this script in a .js file reference it anywhere in the sharepoint site and you should be able to call the function .
<script type=”text/javascript”>
</script>
function OpenDialog(URL) {
var options = SP.UI.$create_DialogOptions();
options.url = URL;
options.width = 600;
options.height = 400;
SP.UI.ModalDialog.showModalDialog(options);
}
<a href=”javascript:OpenDialog(‘URL of the page to be displayed here’)”>Link</a>
You can use this script in a .js file reference it anywhere in the sharepoint site and you should be able to call the function .
Would this work with a Script Editor web part or does it need to be in a .js file? I tried using it in a web part but it didn't do anything, maybe I'm missing something?
ReplyDeleteyes it will work in the script editor webpart too.
Deletewhere does one put the link?
ReplyDelete