I am trying to add my subtotals, taxes and total have tried a few different ways not sure what I am missing
<td colspan=“5”><table align=“center”>
<tbody>
<tr><td>Sub-Total</td><td><input type=“text” id=“subtotal” size=“6” value=“” name=“SubTotal”
onChange=“UpdateSubTotal” readonly=“readonly” /></td></tr>
<tr><td>PST(%)</td><td><input type=“text” id=“pst” size=“6” value=“7.0” name=“pst”
onfocus=“document.form1.pst.blur()” readonly=“readonly”/></td></tr>
<tr><td>GST (%)</td><td><input type=“text” id="gst"size=“6” value ="5.0"name=“gst”
onfocus=“document.form1.gst.blur()” readonly=“readonly”/></td></tr>
<tr><td>Total</td><td><input type=“text” id=“total” size=“6” name=“ttl”
onfocus=“document.form1.ttl.blur()” readonly=“readonly”/></td></tr>
function UpdateSubTotal(st1,st2,st3,st4,st5,st6){
var a = document.getElementById("st1").value;
var b = document.getElementById("st2").value;
var c = document.getElementById("st3").value;
var d = document.getElementById("st4").value;
var e = document.getElementById("st5").value;
var f = document.getElementById("st6").value;
document.getElementById(subtotal).value = (st1 + st2 + st3 + st4 + st5 + st6);
var g = document.getElementById("subtotal").value;
var h = document.getElementById("gst").value;
var i = document.getElementById("pst").value;
var j = document.getElementById("total").value;
document.getElementById("subtotal").value=parseFloat(a) +parseFloat(b)+parseFloat(c)+parseFloat(d)+parseFloat(e)+parseFloat(f)
document.getElementById("gst").value=parseFloat(g) * parseFloat(h)
document.getElementById("pst").value=parseFloat(g) *parseFloat(i)
document.getElementById("total").value=parstFlost(g) +parseFloat(h)+parseFloat(i)
}
i think in my quest to make it work I have messed something up and now it doesn’t work
Any advice?