I want to open a custom page to be opened in a modal dialog instead of new page.

1 Answer 1


below is the script

function popUp()
var options = SP.UI.$create_DialogOptions();
options.title = "Title";
options.width = 800;
options.height = 450;   
options.allowClose = true;
options.showClose = true;   
options.url = "/SubSite/SitePages/pageName.aspx;
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);   
function CloseCallback(){}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.