Jump to content



Photo

javascript calculate tax


  • Please log in to reply
3 replies to this topic

#1 ironsight2000

ironsight2000

    Neowinian Senior

  • Joined: 26-August 06
  • Location: Toronto

Posted 26 November 2009 - 03:50

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);
}



#2 +M2Ys4U

M2Ys4U

    Your friendly neighbourhood Pirate!

  • Joined: 02-June 04
  • Location: England, UK, Europe

Posted 28 November 2009 - 12:17

I don't understand what exactly you're asking for...

#3 BGM

BGM

    Wibble Wobble™

  • Joined: 30-March 03
  • Location: Farnborough, UK

Posted 28 November 2009 - 22:10

what he said ^ ;)

#4 Knightwolf20024

Knightwolf20024

    Neowinian

  • Joined: 25-March 05
  • Location: Toronto Ontario Canada

Posted 28 November 2009 - 22:17

sounds like hes trying to write something that will calulate the sales tax on an item.