Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Iframe is not working on the form even passing google url

Posted on by Microsoft Employee

Hi 

i have requirement to show the share point documents on the form on CRM2016 online.

so tried to add the iframe on the form and tried to access the share point socuments using js.

the iframe is not working displayed "Conent is not diplayed error".

so tried to set URL https://www.google.com  on the URL of the Iframe "Content is not displayed".

So tried to set the url using javascript on load of the form it was displaying same "Content is not displayed".

ContentnotdispalingonIframe.PNG

function OnLoad()
{

var IFrame = Xrm.Page.ui.controls.get("IFRAME_test");

var Url = IFrame.getSrc();
//IFrame.setSrc("https://www.google.co.in/");

//document.getElementById("IFRAME_test").src = "https://www.google.co.in/";

var params = Url.substr(Url.indexOf("?"));

var newTarget = "https://www.google.co.in";
IFrame.setSrc(newTarget);

}

tried the above to set google page on IFrame but not worked.

so changed the settings of the IE11, enabled mixed mode and some other options.

but not worked.

can you please help me what i am doing wrong here.

thanks in Advance.

\\Prasu

*This post is locked for comments

  • Suggested answer
    BennB Profile Picture
    BennB on at
    RE: Iframe is not working on the form even passing google url

    I know my response is late, but I am posting it in case it might help someone else.

    Some sites such as google will not allow you to load there page in an iframe. This is because of the header response X-Frame-Options: SAMEORIGIN

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options


    if you are using CRM online, you might not be able to load pages (eg. running from a local webserver) that are not using the HTTPS protocol.

  • Suggested answer
    Goutham A Profile Picture
    Goutham A on at
    RE: Iframe is not working on the form even passing google url

    This is error with crose side scripting. Please refer below link for solution

    blogs.msdn.microsoft.com/.../cross-domain-iframe-requests-from-crm-online-are-blocked-in-sharepoint-online

  • Suggested answer
    Kishor Kumar Profile Picture
    Kishor Kumar 3,702 on at
    RE: Iframe is not working on the form even passing google url

    Hi find this thread

    community.dynamics.com/.../167556

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Iframe is not working on the form even passing google url

    Hi,

    This same error occurred when i was create a dashboard. Please try to use www.bing.com instead of www.google.com. some url doesn't supported in dynamics crm iframe. Please use IE.

    Thanks...

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans