Forum /
Sencha Touch 1.x Forums /
Sencha Touch 1.x: Discussion /
Setting html inside a panel from a function
Setting html inside a panel from a function
<code>
var panel = new Ext.form.FormPanel({
xtype: 'fieldset',
id: 'tweetFieldset',
title: 'Tweet Reply',
items:[{
items: [{
id: 'tweetMessage',
xtype: 'panel',
html: "tweet"
}, {
xtype: 'textareafield',
name: 'tweetReply',
}]
}, {
items: [{
id: 'replyTweetButton',
xtype: 'button',
width:'150',
ui: 'confirm-round',
text: 'Reply',
handler: this.onTweetReply,
scope: this
}]
}]
});
</code>
I want to change the html value of the tweetMessage panel from a function. I m trying to do
Ext.getCmp('tweet').setValue('new tweet');
But it does not works.
Any suggestions
Sencha - Senior Forum Manager
What field has the id 'tweet'? If you want to put html inside a panel then use update() on the panel.
Thanks, it works.
Sencha Rocks!!
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us