Guys,
Newbie questions
I create a simple order form
Product Price Quantity Total
------------------------------------------------------
Product A 1000
Product B 2000
Product C 1000
------------------------------------------------------
Sub Total xxxxxx
Shipping xxxxxx
Total xxxxxx
The code :
<script language="JavaScript">
function GetTotal() {
shipping = 100;
subtotal=subtotal+(product-a.value)*1000;
subtotal=subtotal+(product-b.value)*2000;
subtotal=subtotal+(product-c.value)*1000;
total=subtotal+shipping
}
</script>
I put on onchange=GetTotal() on quantity field, but
nothing happened when i change the quantity.
Since I'm new in js, could anyone help me?
Any suggesstions would be really appreciated.
Rgds,