Something is causing one of the values to appear to be a string.
What is the format of the fields?
Are there any null or empty fields being used in the calculation?
One can use the Number constrictor to force values to numerics.
If you include the $ symbol you are creating a string not a number.
To force values to numerics you can multiply by 1:
var nTotal = (50.00 * 1) + (50.00 * 1); var sTotal = "$" + nTotal;
I apologize for not responding sooner. Since the switch from AcrobatUsers.com I did not know I needed to log in and look at my content to see answers; I thought I would receive an email notification that someone had answered.
It's been 2 months since my post. I had created three variables, the first two referencing numeric formatted text fields [example var num1 = +getField("num1").value and var num2 = +getField("num2").value] . (I may have been referencing the fields as "this.getField" instead of "+getField" but don't recall now.) The third variable did not reference a field but rather was a variable adding the first two, as in "var num3 = num1 + num2" and then I would assign the value of var num3 to a third field, with the result being, for example, 50 + 50 = 5050 instead of 100.
This was resolved by creating another field to receive the value of num1 + num2
Post your full, actual code, please.