0

i need to create enterprise wiki page in Modal Dialog box ,when user enter name of the wiki page after click on save button.then it should return parameter.return parameter use for another process like redirect to another page.

0

open dialog box to create wiki page function openDialogAndReceiveData() { var options = { url: "MycreateWikiPage.aspx", dialogReturnValueCallback: onClose }; SP.UI.ModalDialog.showModalDialog(options); }

 function onClose(result, returnValue) {
     if(result== SP.UI.DialogResult.OK)
     { 
        //this is a value from dialog box
        alert(returnValue);
     }
 }

in dialog box (MycreateWikiPage.aspx), onclick on Save button:

 function closePopupAndPassData() {
     //your code to create wiki page
     ...
     SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, "my info for another page");
 }

full code

see also commonModalDialogClose options and showModalDialog options _https://msdn.microsoft.com/en-us/library/office/ff409609(v=office.14).aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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