I am new using javascript for the pdf and I have the following code and the calculation doesn't. What I am trying to do is if the person check USA it will display the correct value into the field otherwise if other than USA it will do the second case.
Any help will be appreciated and thank you in advance.
Here is what I have:
Thank you in advance
Any help will be appreciated and thank you in advance.
Here is what I have:
Code:
var AmtShipping = this.getField("Cost").value;
var Country = this.getField("Country").value;
if( AmtShipping == 0)
event.value = '';
if(( AmtShipping == 7)&&(Country ==USA))
event.value = 9.00;
if((AmtShipping ==9)&&( Country ==USA))
event.value = 4.50;
if((AmtShipping <=50)&&( Country ==USA))
event.value = 9.00;
if((AmtShipping <=100)&&( Country ==USA))
event.value = 12.00;
if((AmtShipping <=150)&&( Country ==USA))
event.value = 12.00;
if( AmtShipping >= 151)
{
event.value = 25.00};
if((AmtShipping <=50)&&( Country !=USA))
event.value = 18.00;
if((AmtShipping <=100)&&( Country !=USA))
event.value = 22.00;
if((AmtShipping <=150)&&( Country !=USA))
event.value = 27.00;
if( AmtShipping >= 151)
{
event.value = 32.00};
Thank you in advance
Comment