Javascript - Calculating taxes
Copy link to clipboard
Copied
Hi,
Im trying to create a PDFElement form that will calculate taxes only for either PA(1.06%) or Philadelphia, PA (1.08%), PA; not for MD or DE. I have a combo drop down box that I am trying to link it to. I cant figure out how to add the city part (a text box) into the equation. This is what I have so far, but I am totally new, so it might be all wrong.
var fTaxRate; // variable for tax rate
switch(this.getField('Combo Box1').value) {
case 'PA': // Pensylvania
fTaxRate = 0.0106; // tax rate for this state
break; // skip the rest of the test
case 'DE': // Delaware
case 'MD': // Maryland
default: // all other states
fTaxRate = 0;
} // end switch
// compute tax rate times the sum of subtotal 1event.value = fTaxRate * (this.getField('Text Box45').value);
Copy link to clipboard
Copied
What is a PDFElement form? This forum is for questions about Adobe products....
Copy link to clipboard
Copied
Assuming this is indeed a PDF file, you didn't really explain how the city value comes into play in the calculation...
Copy link to clipboard
Copied
Hi,
Should I add
case 'Philadelphia': // Philapelphia
case 'PA': // Pensylvania
fTaxRate = 0.0108; // tax rate for this city
Sorry completely new. This is a PDF file. I thought Adobe owned PDFElement. Ill have to research that more.
Thank you
Copy link to clipboard
Copied
PDFElement is not a Adobe product.
Copy link to clipboard
Copied
Hi All,
I thought PDFElement was apart of Adobe? Am I wrong?
Thank you
Copy link to clipboard
Copied
You are wrong.
Copy link to clipboard
Copied
Adobe never had such a product, as far as I'm aware.
Copy link to clipboard
Copied
Ok thanks. Ill transfer it to adobe then reach back out.
Thank you for the information

