0

I need to create pop up boxes linked to images on a SharePoint page. The pop up needs to contain text which is further information on the image. When the user clicks on the image the pop up box needs to appear whilst the main page is greyed out in the background. The box that appears can actually be another SP page that the pop up is linked to if this is easier.

I have tried and successfully got a pop up box to appear on a page by going Insert>Embed Code and using code I found on another forum.
However this would only link to an external website. It also appeared as text on the main page and I could not get it to link to the image as required.

Can anyone advise how to do this please?

1

http://wp.ahcheng.com/2013/04/09/calling-dialog-modal-form-in-sharepoint-2013/ http://mscrmblog.net/2013/10/18/sharepoint-2013-open-a-modal-dialog-using-javascript/

from the above blog:

       function showSPDialog(pageUrl) {
               var options = { url: pageUrl, width: 400, height: 300 };
           SP.SOD.execute
             ('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', 
              options);
         }
        function showSPDialog(pageUrl) {
          var options = { url: pageUrl, width: 400, height: 300 };
             SP.SOD.execute
            ('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', 
           options);
            }

pls check HERE as well.

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.