Skip to content

Instantly share code, notes, and snippets.

@premchandpl
Created July 10, 2014 16:17
Show Gist options
  • Select an option

  • Save premchandpl/84490f1d6d14a7938eaf to your computer and use it in GitHub Desktop.

Select an option

Save premchandpl/84490f1d6d14a7938eaf to your computer and use it in GitHub Desktop.
Opening the page in a dialog
openInDialog = function (dlgTitle, dlgWidth, dlgHeight, dlgAllowMaximize, dlgShowClose, needCallBackFunction, pageUrl, dialogData) {
var options = { title: dlgTitle, url: pageUrl, width: dlgWidth, height: dlgHeight, allowMaximize: dlgAllowMaximize, showClose: dlgShowClose, args: dialogData };
if (needCallBackFunction) {
options.dialogReturnValueCallback = Function.createDelegate(null, closeDialogCallBack);
}
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment