Question
Document JavaScript and Validation
My Adobe Acrobat was going slow due to the calculations I had. So I moved the calculations into a Document JavaScript. Below is one example of 20 calculation functions. The I go to the Total01 text Field and select run custom Validation Script. In there I have Total01(); However it does not work what am I missing?
function Total01()
{
// Get the field values, as numbers
var v1 = this.getField("Cost01").valueAsString;
var v2 = this.getField("Trips01").valueAsString;
// Multiply the values
var result = v1 * v2;
// Set the value of this field, rounding to two decimal places
Total01=result;
};
