Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Unable to display iframe in OBIEE dashboard

Received Response
274
Views
13
Comments
Rank 3 - Community Apprentice

Hi,

Currently we have an issue when upgrading from obi 11g (11.1.1.9.1) to 12c (12.1.2.1.0). As part of 11g, there is an iframe on obiee dashboard which links to an external application (Oracle apex 4.2.4).

Post upgrade to 12C, we have default restriction to block external content.

I have gone through oracle documentation to enable the external content but I could not get the iframe to work. Below is the iframe code which we are using in the dashboard.

<script language="JavaScript">

function resize_iframe()

{

  //alert ("resized");

  document.getElementById('APEXiFrame').style.height = (document.getElementById('PageContentOuterDiv').style.height.replace('px', '') - 50) + 'px';

}

window.onresize=resize_iframe;

</script>

<IFRAME id = "APEXiFrame" onload="resize_iframe()"

   style="margin: 0;

              padding: 0;

              height: 0px;

              width: 100%;"

    src="http://@{biServer.variables['APEX_SERVER_VAR']}/"

    scrolling=""

   frameborder="0">

</IFRAME>

Please note that I have provided the sample URL. Browser is Google Chrome

Could gurus please help me on this?

Thanks,

Sai

Message was edited by: bskumar.obiee

Welcome!

It looks like you're new here. Sign in or register to get started.
«1

Answers

  • "could not get the iframe to work" doesn't say a lot ....

    So what happen when you do that? What does your browser display? What does the browser tell you?

  • Rank 3 - Community Apprentice

    When I add the mentioned code on to the dashboard text section and run it. A blank screen gets displayed. When I run through the debugger on the browser tools. I get something like this "Blocked loading mixed active content".

  • Didn't you say you checked the documentation and configured CSP in OBIPS accordingly to your needs?

  • Rank 3 - Community Apprentice

    You are right.. that was the first step I did.

    <ServerInstance>

    <Security>

    <ContentSecurityPolicy>

    <PolicyDirectives>

    <Directive>

    <Name>frame-src</Name>

    <Value>*</Value></Directive>

    <Directive><Name>img-src</Name>

    <Value>*</Value>

    </Directive>

    </PolicyDirectives>

    </ContentSecurityPolicy>

  • Rank 6 - Analytics Lead

    Not 100% sure about this one but don't you need to alter the value of the parameter InIFrameRenderingMode to be able to display iframes? See here

    @Gianni Ceresa will probably be able to confirm that

  • Isn't this setting the other way round?

    It allows OBIEE to be embedded as iframe in other pages, while what I get from the OP is that he wants to display an APEX page inside an iframe in OBIEE.

    I still didn't have a running environment to just try it and see the messages the browser return.

  • Tested an iframe in 12.2.1.3.0, after setting the CSP the iframe content load just fine.

    Your javascript didn't work at all for me but the iframe is there

    I would highly suggest you give up that javascript code which is about 15 years old and use jQuery instead: it's there by default in OBIEE 12c and it support events a lot better than the old approach.

  • Rank 3 - Community Apprentice

    Thanks @Gianni Ceresa for your analysis. Is there any sample jQuery code that I can use since I'm not sure of how it works with OBIEE? It would be great if you can help me with that.

    Thanks,

    Sai

  • What's your target? What is defining the size of the iframe? PageContentOuterDiv - 50px seems to be a bit of a random approach where you fixed 50 as enough to show other things taking some space on the screen.

  • Rank 3 - Community Apprentice

    Sorry for the delayed response.. I guess Size of the iframe should be defaulted to size of the dashboard page. The existing JS code is from legacy system, so I'm not really sure about the actuals.

Welcome!

It looks like you're new here. Sign in or register to get started.