1 Reply Latest reply on Jul 19, 2014 7:37 AM by try67

    Disable checkboxes when a text box is greater than...

    locoeltomo

      Hi,

       

      Having a bit of difficulty getting a function to work.

       

      I have a number of check boxes each with their own numeric value. The total of these values are entered into a text box. (i.e. CB1 = 5, CB2 = 6, CB3 = 3. CB1 + CB2 = 11)

       

      What I need is a way to disable the unchecked checkboxes when the textbox value is over 10. So just stop the user checking any more boxes after the value is over 10.

       

      if ("TextField" < 10)   

      {

      {

      this.getField("CB1").readonly = true;

      }

      }

       

      I would had though this would be enough to at least set the checkbox to readonly?

       

      Thanks

      Tom