MNR
MNR

Reputation: 1073

ExtJs label text change

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

Upvotes: 4

Views: 15639

Answers (1)

Paolo Stefan
Paolo Stefan

Reputation: 10253

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.

Upvotes: 11

Related Questions