Answered
issues with if then javascript
I am needing to have a script so that
if field a >0 than field b =150
else field be =0
I am needing to have a script so that
if field a >0 than field b =150
else field be =0
The "then" term isn't used in javascript, just "if"... "else if"... "else"... ("else if" if you have more than the one case to check... though there's also "switch case" for that purpose).
if(this.getField("a").value>0) {
this.getField("b").value=150;
}
else
{
this.getField("b").value=0;
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.