Skip to Content

Fetch control of outer application in inner iframe

Sep 15, 2017 at 04:27 AM


avatar image


I have created a tool page with its main content as iframe. I have a popover on header of toolpage. I want to close this popover automatically when a click happen on page.Its working fine on header , side menu and footer part except main content which is iframe. iFrame consist of different application in different package .I have implemented window event listener for click but i am unable to fetch any reference of popover in this application

Is it anyway possible to fetch control popover in other application so I can use the close method of contorl?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Joseph BERTHE Sep 15, 2017 at 04:54 AM

Can you post some code to verify you do the rigth things ;) ?



Show 1 Share
10 |10000 characters needed characters left characters exceeded

Currently I am using below code. I am only able to fetch DOM

window.addEventListener('click', function(e){

if(window.parent.document.getElementById('id.popover') && document.activeElement=== document.querySelector('body')){


} });

To create iframe I am using-


var content = pageRef.getMainContents();

var src; if(tab === 'CS'){

src = 'source of other application'; }

else if( tab=== 'TM')

src = "'source of other application";


var iframe = new sap.ui.core.HTML({width:'100%' ,height:'100%'});

iframe.setDOMContent(this.doCreateIFrame(src)); // docreateFrame create the frame according to source

pageRef.addMainContent(iframe); // add to toolpage