Question
Javascript - Calculating taxes
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);
