web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

html modal pop up

(0) ShareShare
ReportReport
Posted on by 3
Hi all,
 
I have an html web resource that has some text and I would also like to add a link within the page that will show a modal pop up to another html web resource.  Would anyone be able to assist? Thank you.
I have the same question (0)
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    You can implement this with the following code.
    I have an a tag link in the HTML Resource, clicking on this link pops up a window showing the specific HTML Web Resource.
    <body>
        <h1>Test</h1>
        <a id="link" href="#">Click to open the HTML Web Resource window.</a>
    </body>
    <script>
        var a = document.getElementById("link")
        a.addEventListener("click",function(){
        var pageInput = {
            pageType: "webresource",
            webresourceName: "cr77c_test"
        };  
        var navigationOptions = {
            target: 2,
            height: {value: 80, unit:"%"},
            width: {value: 70, unit:"%"},
            position: 1
        };
        window.top.Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
        function success() {
                // Run code on success
        },
        function error() {
                // Handle errors
        }
    );
        })
       
    </script>
     
     
    The relevant API link is referenced below.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Hi,
     
    Has the issue been solved?
    Have there been any updates? Please feel free to ask me if you have any questions!
    If it has been resolved, can you mark the response as an answer?
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 70 Super User 2026 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 44 Super User 2026 Season 2

#3
Subra Profile Picture

Subra 42 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans