1 Reply Latest reply on Apr 16, 2015 1:53 AM by try67

    Help with Javascript if else...

    brittanys203048

      I cant get this to calculate.  Not getting any errors...

       

      what I am trying to do:

      If the number the client enters in Methadone is between 1-10 I want the multiply by 4 and display result in MethadoneMed

      If the number the client enters in Methadone is between 11-20 I want to multiple by 5 and display result in MethadoneMed

       

      here is what I have

       

       

      var MethadoneMed = Number(this.getField("Methadone").value); 

       

      if (Methadone>=1 && Methadone<=10) event.value = this.getField("Methadone").value*(4); 

       

      else if (Methadone>=11 && Methadone<=20) event.value = this.getField("Methadone").value*(5); 

       

      else event.value = 0; 

       

       

      any ideas?