PDA

View Full Version : get html from panel



nofx
31 Oct 2011, 6:41 AM
Hi, is there a way to get the html from a panel?? Something like:

Ext.getCmp('my-panel').getHtml();

AndreaCammarata
2 Nov 2011, 5:20 AM
Hi nofx.
Actually there's no function that allow you to get the panel html, because the html property is removed from the component after it is rendered.
However, I write you an example that show you how to get it



Ext.setup({
onReady: function() {


var pnl = new Ext.Panel({
fullscreen: true,
html: '<p>This is the html content</p>'
});



alert(pnl.body.dom.innerHTML);


}
});


Hope this helps.