Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

we are implementing a feature in sharepoint where the user can share documents, we are reworking our own UI to make it easier for the end user. We have a modal popup where you can select multiple users, once you click okay, they will receive a email and the permissions to edit the shared document.

In the user selection, we want to use a Modal, i know sharepoint already has a Modal where you can select multiple users, i was wondering if there where any ways we could use that one and change the OnOkButtonClick event to redirect to our custom functions to give the users permissions etc...

Thanks :D

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

There is this SP.UI.ModalDialog class (MSDN doku). With dialogOptions you can specify, how will your page behave after the user closes the dialog.

function OpenMasterdataDialog(strPageURL) {
    var dialogOptions = SP.UI.$create_DialogOptions();
    dialogOptions.url = yourPageWithDialogContent;
    dialogOptions.width = 750;
    dialogOptions.height = 950;
    dialogOptions.dialogReturnValueCallback = closedCallback; // Function to capture dialog closed event
    SP.UI.ModalDialog.showModalDialog(dialogOptions);
    return false;
}

function closedCallback(dialogResult) {
   //your method to redirect to new page
}
share|improve this answer
    
This would be a new modal, am looking for ways to use already existing modals with all the controls already set and then just change the Callback on the OK button. An exemple of this would be when you go to site settings > site permissions > grant permission, the modal popup as what i need, cant i just use that one ? –  Dr.Denis McCracleJizz Apr 12 '12 at 15:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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