views:

31

answers:

1

Hello, I am using EXTJS V 3.0. I am poping an Ext window that contains an IFRAME in it. I would like the IFRAME to always fit the window content area. I would also like to know what is the current IFRAME size so I can resize inner iframe objects as well. Is it possible? Thx

A: 

Your question is little bit confusing. However, have a look at the below code. It does exactly what you want.

var win = new Ext.Window({
    title: 'Frame Window',
    width: 500,
    height: 400,
    shim: false,
    animCollapse: false,
    constrainHeader: true,
    layout: 'fit',
    items: new Ext.Panel({
        bodyCfg: {
            tag: 'div',
            cls: 'x-panel-body',
            children: [{
                tag: 'iframe',
                name: 'myframe',
                id: 'myframe',
                src: 'http://www.google.com',
                frameBorder: 0,
                width: '100%',
                height: '100%',
                style: {
                    overflow: 'auto'
                }
            }]
        },
        region: 'center'
    })
});
Swar
thanks , will give it a try
Eliran