I've nearly completed creating an Advertising Contract but just have a few questions...
The contract has a table with 18 rows and 19 columns and so far all of my calculations are running fine. The last column is a 'Total Cost Per Line' field, which is set to 'read-only' and calculate the fields I need added. Right now I have all 18 rows in that column showing '$0.00' before anything is entered. Without setting them to hidden, is there a way I can just have those fields blank until the calculation is made?
One more question...
Near the end of the form I have a button to calculate 'Agency Commission' depending on what's in the 'Gross Total' field. Basically .15 x "grosstotal". It works but how do I tell it to put the result of that calculation in the Agency Commission field? The field should be left blank and not calculate anything unless the button is clicked.
Thank you for your time!!!
-Michael
if (event.value == 0) event.value = "";
For the button "Mouse Up" action you need to use JavaScript to access the "grosstotal" field and the Agency Commission field:
this.getField("agencycommission").value = 0.15 * this.getField("grosstotal"),value;
// to supress a zero result:
if this.getField("agencycommission").value == 0) this.getField("agencycommission").value = "";
George Kaiser