locked
Modal popup RRS feed

  • Question

  • Hi

    I am using script to open sharepoint 2013 sitepage page in modal popup.

    But it is not working.

    My script is 

     <a href="#" onclick="openInDialog(500,600,true,true
    ,false,'http://<domain>/sites/<sitecollection>/SitePages/wikipage.aspx');">wiki</a>

    how to achieve this.

    Thanks & regards,

    Siva.

    Tuesday, March 10, 2015 9:23 PM

Answers

  • You didn't include the function, but you should use SP.UI to open the dialog which goes something like this:

    function openDialog()
    {
            var options = {
                title: 'title',
                width: 500,
                height: 500,
                url: '[link to page]',
                dialogReturnValueCallback: myCallbackFunction
            };
    
            var dialogRef = SP.UI.ModalDialog.showModalDialog(options);
    }
    
    function myCallbackFunction()
    {
    
    }


    Kind regards,
    Margriet Bruggeman

    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

    • Proposed as answer by AlexanderShelopukho Wednesday, March 11, 2015 11:51 AM
    • Marked as answer by Siva440 Monday, March 16, 2015 9:12 PM
    Wednesday, March 11, 2015 11:33 AM