PDA

View Full Version : How to add Iframe in a Panel



indupuripraveen
22 Aug 2011, 10:57 PM
Ho can I add an iframe into a TabPanel. I need an solution using extjs 4.0.

skirtle
23 Aug 2011, 12:29 AM
Something like this maybe?


new Ext.tab.Panel({
height: 400,
renderTo: Ext.getBody(),
width: 400,
items: [{
layout: 'fit',
title: 'Tab',
items: {
xtype: 'component',
autoEl: {
src: 'http://localhost/',
tag: 'iframe'
}
}
}]
});

skirtle
23 Aug 2011, 1:55 AM
On second thoughts, maybe I can simplify that a little:


new Ext.tab.Panel({
height: 400,
renderTo: Ext.getBody(),
width: 400,
items: [{
title: 'Tab',
xtype: 'component',
autoEl: {
src: 'http://localhost/',
tag: 'iframe'
}
}]
});