How do I create a modal text pop-up on Intranet page of SharePoint when link is clicked?

Jenn Tynan 1 Reputation point
2022-11-02T22:01:05.19+00:00

I'm building the Intranet landing page for our organization. I had hoped to turn the Quick Link buttons into short FAQs that could be clicked, with a modal pop up text box coming up with the quick answer. There seems to be no way to build a pop up into SharePoint without paying for apps (and even those apps dont seem to have the functionality I'm looking for)
Any support very appreciated!

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,221 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,622 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,668 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,116 Reputation points
    2022-11-03T07:09:56.913+00:00

    Hi @Jenn Tynan ,

    According to my research and testing, if you want to create modal pop up in SharePoint, you can try to use the following code (The full code is in the attachment, please check it out.):

    256683-image.png

    Please follow these steps in this document: Create Modal Dialog Pop Up In SharePoint 2016 And Office 365

    Similar issue for reference: How to make a Modal popup when someone clicks a link on my page

    Hope it can help you. Thanks for your understanding.

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  2. Rijwan Ansari 746 Reputation points MVP
    2022-11-03T07:49:55.977+00:00

    Hi,

    You can do by adding script editor web part as shown.

    256580-image.png

    Then add script

    <button onclick="showModalPopUp();" type="button">Click me​</button>  
    <script language="javascript" type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>    
    <script language="javascript" type="text/javascript">    
      
        function showModalPopUp() {    
            //Set options for Modal PopUp    
            var options = {    
                url: '/sites/xxx/Lists/List_test2', //Set the url of the page    
                title: 'SharePoint Modal Pop Up', //Set the title for the pop up    
                allowMaximize: false,    
                showClose: true,    
                width: 600,    
                height: 400    
            };    
            //Invoke the modal dialog by passing in the options array variable    
            SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);    
            return false;    
        }    
    </script>    
    

    https://learn.microsoft.com/en-us/answers/questions/956008/creating-pop-ups-on-sharepoint.html

    0 comments No comments

  3. Jenn Tynan 1 Reputation point
    2022-11-03T14:53:44.177+00:00

    @Rijwan Ansari unfortunately I am using SharePoint in the modern version and don't have access to the Script Editor web part as shown.