PDA

View Full Version : [CLOSED] Label.setText HTML



supera
Jan 27, 2012, 11:38 AM
I need set this HTML text to Label, into a Javascript function...

I try set the label.html property.. did not work...

I try set the label.setText('My <b>text</b> here', true) (in Sencha ExtJS 4.0 Docs, is written that the second parameter is HTML encoding)... did not work to.

I'm probably not knowing consult the ExtJS Docs.
When I need to use some ext.net control in javascript code, the properties and methods are described in ExtJS Docs? Exactly the same? Am I right in trying to resolve for myself?

Thanks for any help?

Daniil
Jan 27, 2012, 12:41 PM
Hi,

You should pass "false" as the secomnd argument which means "do not encode". A value should not be encoded if you need apply an HTML string.



When I need to use some ext.net control in javascript code, the properties and methods are described in ExtJS Docs? Exactly the same? Am I right in trying to resolve for myself?

Yes, you can rely on ExtJS API docs, we don't break it.

We commonly extend the native ExtJS API (repeat myself, don't breaking existing).

supera
Jan 27, 2012, 1:31 PM
Thank you, Daniil... works fine.