Answered by:
SharePoint Modal Popup

Question
-
Hi..
How to create a SharePoint Modal Popup window and when we select some value in modal popup that value should be redirected to parent form..
Ravindranath
Monday, March 24, 2014 10:40 AM
Answers
-
In the option dialogReturnValueCallback you can define a function that will be executed after the dialog was closed. By now you create a delegate pointing to CloseCallback3 but this is not defined in your code.
If you call SP.UI.ModalDialog.RefreshPage in this callback method the page gets refreshed after the dialog was closed with OK.function OpenCustomDialog(dialogUrl, dialogWidth, dialogHeight, dialogTitle, dialogAllowMaximize, dialogShowClose) { var options = { url: dialogUrl, allowMaximize: dialogAllowMaximize, showClose: dialogShowClose, width: dialogWidth, height: dialogHeight, title: dialogTitle, dialogReturnValueCallback: function(dialogResult) { SP.UI.ModalDialog.RefreshPage(dialogResult) } } }
Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)
- Proposed as answer by Muhammad Sami Ahmed Monday, March 24, 2014 7:39 PM
- Marked as answer by Qiao Wei Tuesday, April 8, 2014 1:37 AM
Monday, March 24, 2014 1:02 PM
All replies
-
In the option dialogReturnValueCallback you can define a function that will be executed after the dialog was closed. By now you create a delegate pointing to CloseCallback3 but this is not defined in your code.
If you call SP.UI.ModalDialog.RefreshPage in this callback method the page gets refreshed after the dialog was closed with OK.function OpenCustomDialog(dialogUrl, dialogWidth, dialogHeight, dialogTitle, dialogAllowMaximize, dialogShowClose) { var options = { url: dialogUrl, allowMaximize: dialogAllowMaximize, showClose: dialogShowClose, width: dialogWidth, height: dialogHeight, title: dialogTitle, dialogReturnValueCallback: function(dialogResult) { SP.UI.ModalDialog.RefreshPage(dialogResult) } } }
Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)
- Proposed as answer by Muhammad Sami Ahmed Monday, March 24, 2014 7:39 PM
- Marked as answer by Qiao Wei Tuesday, April 8, 2014 1:37 AM
Monday, March 24, 2014 1:02 PM -
Is your code javascript? It looks like it to me... If so, can you describe its use for me so that I may use it to see if it will work for me? Something like this:
Thursday, January 15, 2015 12:42 PM