Help me please .....
var a = this.getField("dm_transp");
var b = this.getField("dm_e_total");
var c = this.getField("dm_s_total");
var d = this.getField("sf_dm");
d.value = a.value+b.value-c.value;
the problem its only when the result is zero
real sample:
a = 273,55
b = 2974,40
c = 3247,95
then the result is 0,00 and i receved this message of the error above
thanks for any help ......
If you are going to be writing more JavaScript, you might want to look at the tutorials, articles, and eSeminars on demand at this site.
Since it appears you are using a field with a calculation, you need to make sure that that field is calculated as expected. Sometimes a field that is assumed to be a numeric field, is treated as a character string field and this raises formatting issues. You may need to use the 'Number()' constrictor to force a value to a numeric value or the 'isNaN()' function to identify a value that is 'Not a Number', and adjust your calculation as necessary.
Are you performing a division computation within the form?
If so, you need to prevent the division by zero or null.
[url=http://www.acrobatusers.com/tutorials/2006/form_calculations]How to do (not so simple) form calculations[/url] by Thom Parker.
George Kaiser