Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function portal_openModalDialog() {
- var options = SP.UI.$create_DialogOptions();
- options.url = "/_layouts/Upload.aspx?List={327D2CF7-F385-4969-8973-E6FD3908A996}&RootFolder="; //Change the URL to the page you require.
- options.title = "Title of Dialog Window";
- options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
- SP.UI.ModalDialog.showModalDialog(options);
- }
- function CloseCallback(result, value) {
- if (result === SP.UI.DialogResult.OK) {
- SP.UI.Notify.addNotification("Your request has been submitted");
- }
- if (result === SP.UI.DialogResult.cancel) {
- SP.UI.Notify.addNotification("Request cancelled");
- }
- }
- </script>
- <button name="button" type="button" onclick="javascript:portal_openModalDialog();javascript:return false;" href="#" target="_self">Open Link</button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement