3 Replies Latest reply on Aug 22, 2017 10:02 AM by marial5520027

    Checkboxes are not be enabled

    marial5520027

      I added some javascript that worked yesterday but now it is not working. When the oh.value is a certain number checkboxes are checked.

       

      var oat = this.getField("OrderAmtTotals");

      var oa3 = this.getField("OrderAmt3");

      var oa4 = this.getField("OrderAmt4");

      var hr = this.getField("HostRetailTotal");

      var oh = this.getField("OrderPlusHostRetail");

       

       

      if ((oa4.value !=null) || (oa3.value !=null && hr.value !=null))

      {

      if (oh.value < 150.00)

      {

      event.value = 0;

      getField("HalfPrice1").checkThisBox(0,false);

      getField("HalfPrice2").checkThisBox(0,false);

      getField("HalfPrice3").checkThisBox(0,false);

      getField("HalfPrice4").checkThisBox(0,false);

      getField("HalfPrice5").checkThisBox(0,false);

       

       

      }

      else if (oh.value > 149.99 && oh.value < 300)

      {

      event.value = oh.value * .10;

      getField("HalfPrice1").checkThisBox(0,true);

      getField("HalfPrice2").checkThisBox(0,true);

      getField("HalfPrice3").checkThisBox(0,false);

      getField("HalfPrice4").checkThisBox(0,false);

      getField("HalfPrice5").checkThisBox(0,false);

       

       

      }

      else if (oh.value > 299.99 && oh.value < 600)

      {

      event.value = oh.value * .15;

      getField("HalfPrice1").checkThisBox(0,true);

      getField("HalfPrice2").checkThisBox(0,true);

      getField("HalfPrice3").checkThisBox(0,true);

      getField("HalfPrice4").checkThisBox(0,false);

      getField("HalfPrice5").checkThisBox(0,false);

       

       

      }

      else if (oh.value > 599.99 && oh.value < 1000)

      {

      event.value = oh.value * .20;

      getField("HalfPrice1").checkThisBox(0,true);

      getField("HalfPrice2").checkThisBox(0,true);

      getField("HalfPrice3").checkThisBox(0,true);

      getField("HalfPrice4").checkThisBox(0,true);

      getField("HalfPrice5").checkThisBox(0,false);

       

       

      }

      else if (oh.value > 999.99)

      {

      event.value = oh.value * .25;

      getField("HalfPrice1").checkThisBox(0,true);

      getField("HalfPrice2").checkThisBox(0,true);

      getField("HalfPrice3").checkThisBox(0,true);

      getField("HalfPrice4").checkThisBox(0,true);

      getField("HalfPrice5").checkThisBox(0,true);

      }

      else event.value = 0;

      getField("HalfPrice1").checkThisBox(0,false);

      getField("HalfPrice2").checkThisBox(0,false);

      getField("HalfPrice3").checkThisBox(0,false);

      getField("HalfPrice4").checkThisBox(0,false);

      getField("HalfPrice5").checkThisBox(0,false);

       

       

      }