<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Exchanging data with iFrame from another domain (Same Origin Policy) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exchanging-data-with-iFrame-from-another-domain-Same-Origin/m-p/306362#M1240271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to integrate some widget I created with GWT-OpenLayers which interacts with our server in order to get some additional data and draw objects on the map. &lt;/P&gt;&lt;P&gt;The problem I’m running in is: the iFrame can't interact with parent window and vice versa due SOP (Same Origin Policy) restrictions of the browser - I didn't find how to do this with QlikView API. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found several packages which doing some messaging stuff between iFrames. &lt;/P&gt;&lt;P&gt;Here some initialization code I've got from the Porthole JS library which should run when the web page loaded and iFrame created on it: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Create map window */&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;function createComponentIfNeeded(component) { &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!component.framecreated) { &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var el = document.createElement("iframe"); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.setAttribute("id", GWTOPENLAYERSWIDGETFRAME_EXTENSION); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.setAttribute("name", GWTOPENLAYERSWIDGETFRAME_EXTENSION); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.frameBorder = 0; //optional el.style.width = component.GetWidth() + "px"; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.style.height = component.GetHeight() + "px"; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; component.Element.appendChild(el); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.setAttribute("src", SCHEMA_GWT_OpenLayers_Widget_URL); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; component.framecreated = true; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;Qva.AddExtension(EXTENSION_NAME, createComponentIfNeeded, false); &lt;/P&gt;&lt;P&gt;....... &lt;/P&gt;&lt;P&gt;function createWindowProxy() {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; windowProxy = new Porthole.WindowProxy(JETTY_SERVER + "/proxy.html", GWTOPENLAYERSWIDGETFRAME_EXTENSION);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; windowProxy.addEventListener(onMessage); &lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;window.onload = function() {&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; createWindowProxy();&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateData(this); &lt;/P&gt;&lt;P&gt;}; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The frame created and map appears and all initialization server stuff done, but&amp;nbsp; unfortunately window.onload not called in any point (I checked it with Chrome debugger), please advise how to register and on which event? &lt;/P&gt;&lt;P&gt;Please advise how should I send data to the GWT widget in I frame? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to QlickView extensions, and I'll appreciate guidance in finding of the “Creating QV Extensions reference”, which I didn't find here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Vladimir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2026-01-26T16:26:21Z</dc:date>
    <item>
      <title>Exchanging data with iFrame from another domain (Same Origin Policy)</title>
      <link>https://community.qlik.com/t5/QlikView/Exchanging-data-with-iFrame-from-another-domain-Same-Origin/m-p/306362#M1240271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to integrate some widget I created with GWT-OpenLayers which interacts with our server in order to get some additional data and draw objects on the map. &lt;/P&gt;&lt;P&gt;The problem I’m running in is: the iFrame can't interact with parent window and vice versa due SOP (Same Origin Policy) restrictions of the browser - I didn't find how to do this with QlikView API. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found several packages which doing some messaging stuff between iFrames. &lt;/P&gt;&lt;P&gt;Here some initialization code I've got from the Porthole JS library which should run when the web page loaded and iFrame created on it: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Create map window */&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;function createComponentIfNeeded(component) { &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!component.framecreated) { &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var el = document.createElement("iframe"); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.setAttribute("id", GWTOPENLAYERSWIDGETFRAME_EXTENSION); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.setAttribute("name", GWTOPENLAYERSWIDGETFRAME_EXTENSION); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.frameBorder = 0; //optional el.style.width = component.GetWidth() + "px"; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.style.height = component.GetHeight() + "px"; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; component.Element.appendChild(el); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.setAttribute("src", SCHEMA_GWT_OpenLayers_Widget_URL); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; component.framecreated = true; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;Qva.AddExtension(EXTENSION_NAME, createComponentIfNeeded, false); &lt;/P&gt;&lt;P&gt;....... &lt;/P&gt;&lt;P&gt;function createWindowProxy() {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; windowProxy = new Porthole.WindowProxy(JETTY_SERVER + "/proxy.html", GWTOPENLAYERSWIDGETFRAME_EXTENSION);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; windowProxy.addEventListener(onMessage); &lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;window.onload = function() {&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; createWindowProxy();&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateData(this); &lt;/P&gt;&lt;P&gt;}; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The frame created and map appears and all initialization server stuff done, but&amp;nbsp; unfortunately window.onload not called in any point (I checked it with Chrome debugger), please advise how to register and on which event? &lt;/P&gt;&lt;P&gt;Please advise how should I send data to the GWT widget in I frame? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to QlickView extensions, and I'll appreciate guidance in finding of the “Creating QV Extensions reference”, which I didn't find here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Vladimir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exchanging-data-with-iFrame-from-another-domain-Same-Origin/m-p/306362#M1240271</guid>
      <dc:creator />
      <dc:date>2026-01-26T16:26:21Z</dc:date>
    </item>
  </channel>
</rss>

