Check if text box is empty returns false
I have 3 fields, let's call them T1, T2, T3. If T1 is filled/used, then I want T2 and T3 to be read only. But if the content of T1 is deleted again, then I want T2 and T3 to be editable again.
For T1, I implemented the following code in the OnBlur action:
var t1 = this.getField("T1").value;
if (!(t1 = "")) {
this.getField("T2").readonly = true;
this.getField("T3").readonly = true;
} else {
this.getField("T2").readonly = false;
this.getField("T3").readonly = false;
}
The problem I'm noticing is, that as soon as I fill text into T1 and then delete it afterwards, the script still treats it as if there is some content in T1. So, I guess there is some sort of special hidden character in there that I need to do a check for. Any ideas?
I also already tried to use valueAsString, just in case this would remove complications, but it doesn't.
