These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

getting sales tax adding the value of 2 fields?

gvilla
Registered: Nov 12 2007
Posts: 5

Hi,
 
Beginner Question here..
 
I have 2 fields, 1 for subtotal and 1 for extra charges, I want to sum these 2 fields and get the sales tax of 8.25% into a 3rd field. I have searched everywhere and I only found the way to do it from 1 field.
 
Thanks in advance for your help.
 
Gvilla.

Hell-o!

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Macintosh
pddesigner
Registered: Jul 9 2006
Posts: 858
The latest AUG newsletter for this month has a link to Ted Padova's 101 Form eTips with instructions on how to calculate sales tax using JavaScript.

Subscribe to the newsletter and download the free e-book.

My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.

gvilla
Registered: Nov 12 2007
Posts: 5
Hey,

Thanks for the tip.

It is now in my ebookshelf now.

However when I select the tax field and do the following:

var f = this.getField("Sub T","extra");
event.value = Math.round(f.value * 7.25) / 100;

it gives me a wrong calculation, looks like it is only calculating the "Sub T" field and bypassing the "extra" one.

Thanks again in advance for your help.

Gvilla.

Hell-o!