Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Help with Javascript if else...

$
0
0

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?

 


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>