Welcome Guest! To access all forums & features, please register an account or sign-in. → Why register?



javascript calculate tax


3 replies to this topic - - - - -

#1 ironsight2000

    Neowinian Senior

  • 1,575 posts
  • 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

    Your friendly neighbourhood Pirate!

  • 7,997 posts
  • 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

    Wibble Wobbleâ„¢

  • 5,885 posts
  • Joined: 30-March 03
  • Location: Farnborough, UK

Posted 28 November 2009 - 22:10

what he said ^ ;)

#4 Knightwolf20024

    Resident Fanatic

  • 862 posts
  • 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.