Javascript code - change text box fill
I have 2 boxes - 1) Is a running total 2) Cash Avail. I want to write code that will change the Running Total fill to red if the amount is above the Cash Avail
Here is what I have
var RT = this.getField("Run_Total");
var CA = this.getField("CashAvail");
if(RT.value > CA.value){
event.RT.fillColor = color.red;
}else {
event.RT.fillColor = color.transparent;
}
I also tried
var RT = this.getField("Run_Total").value;
var CA = this.getField("CashAvail").value;
if(RT> CA){
event.fillColor = color.red;
}else {
event.fillColor = color.transparent;
}
But nothing happens. I am sure I am missing something.very simple
