-
Sencha User
Answered: Replace html of a html element span
Hi,
My app had a html element
<span id="dummyid">Pause</span>
and a listner for it
listeners : {
painted : function(panel) {
var el = panel.element;
el.on('tap', function(e, t) {
var span = e.getTarget('span');
if (span) {
var changecampid = span.id;
console.log(changecampid);
}
}, panel);
}
}
I need to change the value of span from Pause to active.
Please tell me how can i do this
-
Best Answer Posted by
deepakgarg89
It is now resolved. I had use Ext.get('span id'); and than use setHtml() to change its html 
-
Sencha User
Something like this..
Ext.ComponentQuery.query('#dummyId')[0].setText('<span id="dummyid">Active</span>')
Maybe you could use 'this.setText()' instead.
It's either setText or setHtml()
-
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules