locked
SharePoint Modal Popup RRS feed

  • 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 :)

    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 :)

    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:

    https://social.technet.microsoft.com/Forums/en-US/9340684d-2f44-4c24-9a2e-a4b8d401d7b6/validate-lookup-field-require-value-other-than-first-item?forum=sharepointcustomization

    Thanks!

    Thursday, January 15, 2015 12:42 PM