Changing fill color based on range of values


creating form inspecting parts. working on configuring text field change fill color based on number or data entered. example: if range between 0-20 fill color red, between 20-24 fill color green, greater 24 fill again red, , if no data entered fill color white. script below working me though keeps field red when data removed field (blank). not sure if im approaching correctly of if should looking @ different way? have different ranges many fields , im trying keep script @ straight forward possible. in advance assistance.

 

if (event.value > "24") 

event.target.fillcolor = color.red;

else if (event.value < "20") 

event.target.fillcolor = color.red; 

else event.target.fillcolor = color.green; 

drop double-quotes around numbers make them real numbers instead of strings.



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

after effects warning: unable to create drawing surface

Maximum number of authorizations reached!