on 06-23-2009 9:13 AM
Hi,
I am very new to the java script language. Currently working on adobe forms.
In the form there are 5 currency fields and one calculate button is there.
When the calculate button is clicked, all the 5 currency fields should be summed up
and would be displayed in the field total. How to write the java script for this.
Please help.
Hi,
In the exit event of the button, just write code like this.
Total.rawValue = Field1.rawValue + Field2.rawValue + Field3.rawValue + Field4.rawValue + Field5.rawValue
Or else, you can also use the standard function Sum (), and pass these parameters to it.
Regards
Runal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for it. But in my adobe forms the library fields are from ISR Controls.
For example these are the fields:
payinlieunotice(currency field) and binding has been done to the context $record.PAY_LIEU_NOTICE.DATA[*].FIELD
benefitinlieunotice(currency field) and binded with $record.BENEFIT_LIEU_NOTICE.DATA[*].FIELD.
.
.
.
and total filed binded with $record.TOTAL.DATA[*].FIELD.
The calculate button is ISR On_Form Event and on the screen I have put also ISR_PARAM_EVENT in invisioble mode.
the java script mentioned by you is working fine for standard library elements but for ISR its not.
Please help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Personally, I would skip the button and place the SUM code in the calculate event of your total field - that way, the total is dynamically summed anytime a value is changed and you don't have to rely on a separate button.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.