If/then statement with division
I am trying to write a code that looks at a field and if it equals a specific number (in this case "2"), then it divides another field by that number. Here is what I have so far...
if (this.getField("Tex3").value != 2) {
var numerator = +getField("text1").value;
var denominator = +getField("text2").value;}
// Calculate and set this field value
if (denominator !== 0)
{
event.value = numerator / denominator;
}
else {
event.value = "";
}
It is currently returning nothing.
