Javascript counter

0

I have a form in pdf that already has a javascript that if it is inserted a value other than the predetermined the source turns red, and if it is within the limits determined the source turns green.

I would like to insert three fields of counters, one with the number of fields in red and the other with the number of fields in green, and a third field with the total number of fields (green + red). Can you do that?

Code that I use to do the coloring.

var v = Number(event.value);
  if (v>=10.720 && v<=10.780)
    event.target.textColor = color.green;
  else event.target.textColor = color.red;
    
asked by anonymous 21.02.2018 / 19:51

0 answers