Trying to write a Javascript to compare the lesser amount of two fields (p2 & p3) to perfom a calculation that divides the lesser of the two fields by a 3rd field (p1) that will display the results in the field I'm writing the script. Below doesnt wo
var x = this.getField("p2").value;
var y = this.getField("p3").value;
if (p2 < p3) {
event.value = "p1 / p2";
}
else {
event.value = (p1 / p3).toFixed(2);;
}
