modal dialog tagged posts

SharePoint 2010 – Modal Dialog and strange behavior with the dialog.master

Category: #SharePoint Comments: No comments

In SharePoint 2010 is available the object SP.UI.ModalDialog.You’ll have so the modal dialog windows of SharePoint 2010 available for your application page. That’s cool.

To open the modal dialog you execute the JavaScript code below (you can even add some callback event)

function OpenDialog(strPageURL, delegate, w, h) {
var dialogOptions = SP.UI.$create_DialogOptions();
dialogOptions.url = strPageURL; // URL of the Page
dialogOptions.width = w; // Width of the Dialog
dialogOptions.height = h; // Height of the Dialog
dialogOptions.dialogReturnValueCallback = Function.createDelegate(null, delegate); // Function to capture dialog closed event
SP.UI.ModalDialog.showModalDialog(dialogOptions); // Open the Dialog
return false;

To do that you have available the Dialog.master master page...

Read More