I would like to script (Javascript) two numeric fields so that the total percentage of the two equals 100%
For instance, if one field input is 45, on exit, the other field will be populated with 55.
I can get it to work from one textfield using the formula: NumericField1.rawValue = 100 - NumericField2.rawValue;
But it only works one way. If I use the formula: NumericField2.rawValue = 100 - NumericField1.rawValue; in the second field, that formula is ignored in favor of the first one.
An example is enclosed.
Any help would be appreciated.
Thanks,
Graham
An example is enclosed.
Views
Replies
Total Likes
Hi,
I changed script a little and put it to onChange event.
See example.
BR,
Paul Butenko
Thanks Paul.
The xfa.event reference is new to me. I learn something new every time I ask a question here. Thanks!
Graham
Views
Replies
Total Likes