PDA

View Full Version : Iframe in panel with remoteComponent problem



Spongerusher
6 Nov 2009, 12:51 AM
Hello,

My problem is that my iframe does not fit with my panel.
Here's the code :


// file : client.js loaded by plugin RemoteComponent
{
xtype: 'tabpanel',
id: 'tab_Suivi-Client',
items:[{
xtype:'button',
id:'button',
handler:function(){
var grid = new Ext.grid.GridPanel({
id:'grid',
// bla bla
listeners:{
,celldblclick:function() {

Ext.getCmp('tab_Suivi-Client').add({
id: 'tab_Suivi-Client',
xtype: 'tabpanel',
items:[{
title:'Analytique',
id: codeClient + '_Client-Suivi-Analytique',
autoHeight:true,
layout:'fit',
html:'<iframe src="http://localhost/scripts/cgiip.exe/WService=wsdbdev/index.p? page=accueil&titre=Accueil" width="100%" height="100%">'
}] // eo items
}).show(); // eo tab_Suivi-Client add
} // eo celldblclick
} // eo listener
}).show(); // eo grid
}// eo handler
}] // eo buttons
} // eo tabpanel


The only way i found is to set an explicit height to my iframe (height:600) otherwise my iframe is displayed in a limited height (about 150px)

Somebody could help me ?

Condor
6 Nov 2009, 7:03 AM
Use:

{
title:'Analytique',
id: codeClient + '_Client-Suivi-Analytique',
xtype: 'box',
autoEl: {
tag: 'iframe',
src: 'http://localhost/scripts/cgiip.exe/WService=wsdbdev/index.p?page=accueil&titre=Accueil'
}
}

or do you really need a panel (e.g. for tbar and bbar)?

{
title:'Analytique',
id: codeClient + '_Client-Suivi-Analytique',
bodyCfg: {
tag: 'iframe',
src: 'http://localhost/scripts/cgiip.exe/WService=wsdbdev/index.p?page=accueil&titre=Accueil'
}
}

Spongerusher
6 Nov 2009, 8:19 AM
Sorry Condor, i used both of your methods, nothing changed.
:s

Edit : I'd just noticed that it's works fine on chrome. May be that could help....

Condor
6 Nov 2009, 8:31 AM
Does the container of the tabpanel have a layout that manages the height?

hendricd
6 Nov 2009, 8:32 AM
@Spongerusher -- What's the DOCTYPE ?

Spongerusher
6 Nov 2009, 8:39 AM
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>

hendricd
6 Nov 2009, 8:45 AM
How is it without any DOCTYPE ?

Spongerusher
6 Nov 2009, 12:04 PM
Thx to both of you, it works great now !
I deleted the doctype and used condor's sample code.

However i noticed that the inputs fields style in IE are different since the doctype has been deleted (border top and bottom invisible). Is that normal ?