Last Updated: February 25, 2016
·
2.33K
· jgemedina

ExtJS - Access an IFrame Autoloaded Page in a Panel

Assuming we have a panel where we autoload another page using the iframe mode instead of merge:

var panel = Ext.getCmp('myPanelId');
var iframeWindow = panel.iframe.dom.contentWindow;

we can reference then

  • iframeWindow.myNamespace.MyType
  • iframeWindow.myNamespace.myFunction()
  • iframeWindow.myGlobalVar
  • iframeWindow.myGlobalFunction