• 0

javascript calculate tax


Question

im trying to make a function to calculate tax from the function opprod

function chDelivery(delivery){
var deliv_value=delivery.value;
document.myform.deliveryAmt.value= deliv_value;
}
function opprod(myproducts){
var prod  =myproducts.value;
document.myform.productp.value= prod;
}

function calcTax(myproducts)
	  { var product 
		  product = parseFloat(myproducts);	
		var tax;
		taxout = productp * 0.13;	  
		//return tax;
		document.write(taxout);
		document.write(product);
}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.