PDA

View Full Version : refresh managedIframe panel



suzie
30 Jun 2008, 10:46 AM
Hi everybody,

I have a managedIframe in a desktop.

In this iframe window, I put a menu bar based on Markup (in transform.js)
and add a refresh button :



var mainMenuTb = new Ext.Toolbar('MyToolbar');
mainMenuTb.render();
mainMenuTb.add({
text:'refresh',
handler: function () {
content=Ext.getCmp('Myiframepanel');
content.setSrc();
}.createDelegate(this)
});


like this thread says (http://extjs.com/forum/showthread.php?p=183481&highlight=refresh#post183481)

I have an error : "content has no properties"

I know this is a question of scope but I don't know how to find the Myiframepanel Dom in the parent window.

or maybe there is an other solution...

thanks to your help

hendricd
30 Jun 2008, 1:14 PM
@suzie -- Assuming your MIFPanel is setup similar to :



items:[
{
id:'myMIFP',
xtype: 'iframepanel',
border:false,
loadMask: true,
defaultSrc:myurl
}
],...
and it was rendered, then this would refresh the frame with the last URL it was set to:


handler: function () { Ext.getCmp('myMIFP').setSrc(); }