View Full Version : Access to iframe.contentWindow

14 Aug 2012, 7:42 AM
Hi there.
How can i access the contentWindow (document.body) within the following iframe?
var tab = tabpanel.add({title:"",autoEl:{tag:'iframe', src:href}});

I tried tab.body which returns a simple object.
tab.el the same.

No more ideas left ... :-(

14 Aug 2012, 8:14 AM
Maybe this?

var htmlContent = tab.getEl().dom;

Also note that you may need to declare a specific xtype for your iFrame, otherwise it defaults to 'panel', which may be a bit overkill.

var tab = tabpanel.add({xtype: 'component', title:"",autoEl:{tag:'iframe', src:href}});