PDA

View Full Version : Refresh HTML content from file



kpohl
27 Aug 2011, 10:08 AM
Hi!
I have a panel that represents a helptext-container. I use a loader (see below) to load the content from an external html document.

My question is: how can I dynamically change the content of my panel, that is, change the url and load again?


this.helpPanel = new Ext.Panel({
xtype: 'panel',
title: 'help',
loader: {
url: '../html/helptext1.html',
renderer: 'html',
autoLoad: true
}
});

Many thanks in advance :)

droessner
28 Aug 2011, 9:10 AM
You can use the load method on the panel.


this.helpPanel.load({
url: ''../html/helptext2.html'
//other load options
});

kpohl
9 Sep 2011, 2:14 AM
Thanks droessner!

It works with this code:



this.helpPanel.getLoader().load({
url: ''../html/helptext2.html'
//other load options
});