Hola all, have a "how to" question. I have a form that I wrote (with the help of the you all) that takes a quantity, multiplies it by a fixed price then gives me the subtotal. Then at the bottom of the form it gives a grad total.
What I need to do is, before it displays the grand total I need it to multiply the grand total by 0.06750 then display it.
Below is the code that does this above minus the multipication stuff. I just cut and pasted it out of the table do there might be a few <table> tags missing.
Thanks everyone!!!
<script language="javascript" type="text/javascript">
function calculate(what)
{
// total_Price ALL Tixs_Requestes
what.unmform_Total_Price_all.value =
(what.unmform_Total_PriceA.value - 0)
+ (what.unmform_Total_PriceB.value - 0)
+ (what.unmform_Total_PriceC.value - 0)
+ (what.unmform_Total_PriceD.value - 0)
+ (what.unmform_Total_PriceE.value - 0)
+ (what.unmform_Total_PriceF.value - 0)
}
</script>
<tr>
<center>
<td>Group Size </td>
<td>Seat Type </td>
<td>Qty</td>
<td>Price</td>
<td>Sub Total </td>
</center>
</tr>
<tr>
<td valign="top" align="center" width="79">250+</td>
<td valign="top" align="center" width="85"><input readonly="readonly" align="middle" size="10" border="0" name="unmform_250Prim" value="Premium" /> </td>
<td valign="top" align="center" width="222"><input onkeyup="this.form.unmform_Total_PriceD.value = (this.form.unmform_Tix_RequestedD.value - 0) * (20.00 - 0);calculate(this.form)" size="10" border="0" name="unmform_Tix_RequestedD" /></td>
<td valign="top" align="center" width="97">$18.00</td>
<td valign="top" align="center" width="82"><input readonly="readonly" size="10" border="0" name="unmform_Total_PriceD" /><input type="hidden" name="unmform_LineBreak1" /> </td>
</tr>
<tr>
<td valign="top" align="center" width="79">250+</td>
<td valign="top" align="center" width="85"><input readonly="readonly" align="middle" size="10" border="0" name="unmform_250Silver" value="Silver" /></td>
<td valign="top" align="center" width="222"><input onkeyup="this.form.unmform_Total_PriceE.value = (this.form.unmform_Tix_RequestedE.value - 0) * (20.00 - 0);calculate(this.form)" size="10" border="0" name="unmform_Tix_RequestedE" /></td>
<td valign="top" align="center" width="97">$13.00</td>
<td valign="top" align="center" width="82"><input readonly="readonly" size="10" border="0" name="unmform_Total_PriceE" /><input type="hidden" name="unmform_LineBreak2" /> </td>
</tr>
<tr>
<td valign="top" align="center" width="79">250+</td>
<td valign="top" align="center" width="85"><input readonly="readonly" align="middle" size="10" border="0" name="unmform_250Cherry" value="Cherry" /></td>
<td valign="top" align="center" width="222"><input onkeyup="this.form.unmform_Total_PriceF.value = (this.form.unmform_Tix_RequestedF.value - 0) * (20.00 - 0);calculate(this.form)" size="10" border="0" name="unmform_Tix_RequestedF" /></td>
<td valign="top" align="center" width="97">$8.00</td>
<td valign="top" align="center" width="82"><input readonly="readonly" size="10" border="0" name="unmform_Total_PriceF" /><input type="hidden" name="unmform_LineBreak3" /> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> Grand Total</td>
<td> <input readonly="readonly" size="10" border="0" name="unmform_Total_Price_all" /></td>
</tr>
What I need to do is, before it displays the grand total I need it to multiply the grand total by 0.06750 then display it.
Below is the code that does this above minus the multipication stuff. I just cut and pasted it out of the table do there might be a few <table> tags missing.
Thanks everyone!!!
<script language="javascript" type="text/javascript">
function calculate(what)
{
// total_Price ALL Tixs_Requestes
what.unmform_Total_Price_all.value =
(what.unmform_Total_PriceA.value - 0)
+ (what.unmform_Total_PriceB.value - 0)
+ (what.unmform_Total_PriceC.value - 0)
+ (what.unmform_Total_PriceD.value - 0)
+ (what.unmform_Total_PriceE.value - 0)
+ (what.unmform_Total_PriceF.value - 0)
}
</script>
<tr>
<center>
<td>Group Size </td>
<td>Seat Type </td>
<td>Qty</td>
<td>Price</td>
<td>Sub Total </td>
</center>
</tr>
<tr>
<td valign="top" align="center" width="79">250+</td>
<td valign="top" align="center" width="85"><input readonly="readonly" align="middle" size="10" border="0" name="unmform_250Prim" value="Premium" /> </td>
<td valign="top" align="center" width="222"><input onkeyup="this.form.unmform_Total_PriceD.value = (this.form.unmform_Tix_RequestedD.value - 0) * (20.00 - 0);calculate(this.form)" size="10" border="0" name="unmform_Tix_RequestedD" /></td>
<td valign="top" align="center" width="97">$18.00</td>
<td valign="top" align="center" width="82"><input readonly="readonly" size="10" border="0" name="unmform_Total_PriceD" /><input type="hidden" name="unmform_LineBreak1" /> </td>
</tr>
<tr>
<td valign="top" align="center" width="79">250+</td>
<td valign="top" align="center" width="85"><input readonly="readonly" align="middle" size="10" border="0" name="unmform_250Silver" value="Silver" /></td>
<td valign="top" align="center" width="222"><input onkeyup="this.form.unmform_Total_PriceE.value = (this.form.unmform_Tix_RequestedE.value - 0) * (20.00 - 0);calculate(this.form)" size="10" border="0" name="unmform_Tix_RequestedE" /></td>
<td valign="top" align="center" width="97">$13.00</td>
<td valign="top" align="center" width="82"><input readonly="readonly" size="10" border="0" name="unmform_Total_PriceE" /><input type="hidden" name="unmform_LineBreak2" /> </td>
</tr>
<tr>
<td valign="top" align="center" width="79">250+</td>
<td valign="top" align="center" width="85"><input readonly="readonly" align="middle" size="10" border="0" name="unmform_250Cherry" value="Cherry" /></td>
<td valign="top" align="center" width="222"><input onkeyup="this.form.unmform_Total_PriceF.value = (this.form.unmform_Tix_RequestedF.value - 0) * (20.00 - 0);calculate(this.form)" size="10" border="0" name="unmform_Tix_RequestedF" /></td>
<td valign="top" align="center" width="97">$8.00</td>
<td valign="top" align="center" width="82"><input readonly="readonly" size="10" border="0" name="unmform_Total_PriceF" /><input type="hidden" name="unmform_LineBreak3" /> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> Grand Total</td>
<td> <input readonly="readonly" size="10" border="0" name="unmform_Total_Price_all" /></td>
</tr>