Answered
Hello,
I'm just starting to learn JS, to make some simple scripts for my PDF presentations and forms.
I'm trying to sum different values from a couple of dropdown lists, and showing it in another field:
xfa.resolveNode("form1.page1.NumericField3").rawValue = xfa.resolveNode("form1.page1.DropDownList2").rawValue + xfa.resolveNode("form1.page1.DropDownList3").rawValue + xfa.resolveNode("form1.page1.DropDownList4").rawValue;
I think it is treating the values as strings, cause if the values are 2, 3, 4 the sum field displays 234.
What am I doing wrong?
And: where is the best (free) document to start learning JS from the basics?
Thank you
PS: Sorry about my poor english, in case I made some bad spelling.
LiveCycle Designer has the 'Sum()' function that returns the sum of the non-null elements of a given set of numbers. You have to be aware that a 'null' value is treated as a string and not the number zero.
George Kaiser