PDA

View Full Version : Set HTML into panel Dynamic



pajelawrence
16 Sep 2010, 12:05 AM
How to set HTML value in a panel component?.:)

evant
16 Sep 2010, 12:14 AM
Use the update method on Component.

pajelawrence
16 Sep 2010, 12:21 AM
I got this error on chrome console.

Uncaught TypeError: Cannot read property 'body' of null

This is my code:


Ext.each(dec.chat,function(value){
var html = '<b>'+value.me+': </b>'+value.msg;
var chatBox = Ext.get(value.to); // top bar
chatBox.body.update(html);
})

evant
16 Sep 2010, 12:22 AM
On the Component. Ext.get returns an element reference.

pajelawrence
16 Sep 2010, 12:53 AM
How about if I could append an HTML, I mean the existing HTML Value will still remain.
I'm creating a chat.