Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJs label text change

Tags:

extjs

In ExtJs how to change label text dynamically i.e iam using like this LabelError.innerText = "New password is required."; LabelError.style.color = "red";

but its work only in ie and chrome but not in firefox

so how to change label text dynamically in all browsers

like image 470
MNR Avatar asked Dec 21 '22 14:12

MNR


1 Answers

As you can see in the label class docs, the right way to do it is to call the function:

LabelError.setText('<span style="color:red">New password is required.</span>', false);

The false argument will prevent the html tags from being mangled by the function. Anyway, you can try to experiment with it.

like image 162
Paolo Stefan Avatar answered Jan 13 '23 02:01

Paolo Stefan