Hi, Im trying to get an order form to show values as currency. So a ticket costing 38 dollars is seen as 38.00.
Here is a sample of the code, Any and all help is greatly appreciated.
function calculate(what)
{
what.unmform_Total_Price_all.value =
(what.unmform_Total_TreasureIsland_PriceA.value - 0)
+ (what.unmform_Total_TreasureIsland_PriceB.value - 0)
+ (what.unmform_Total_TreasureIsland_PriceC.value - 0)
}
<TR>
<TD vAlign=top align=middle></TD>
<TD vAlign=top align=middle>
<P align=center><STRONG><FONT style="FONT-SIZE: 12px"><U>Treasure Island</U></FONT></STRONG></P></TD>
<TD align=middle>
<P align=left><U><FONT style="FONT-SIZE: 12px"><STRONG>10/23/11 @ 3:00pm</STRONG></FONT></U> </P></TD>
<TD align=middle> </TD></TR>
<TR>
<TD style="WIDTH: 55px" vAlign=top align=middle><INPUT border=0 value="Price A" readOnly align=middle size=10 name=TreasureIsland_PriceA> </TD>
<TD style="WIDTH: 137px" vAlign=top align=middle><INPUT onkeyup="this.form.unmform_Total_TreasureIsland_PriceA.value = (this.form.unmform_Tix_Requested_TreasureIsland_PriceA.value - 0) * (39.00 - 0);calculate(this.form)" border=0 size=10 name=unmform_Tix_Requested_TreasureIsland_PriceA> </TD>
<TD style="WIDTH: 100px" vAlign=top align=middle>$39.00</TD>
<TD style="WIDTH: 100px" vAlign=top align=middle><INPUT border=0 readOnly size=10 name=unmform_Total_TreasureIsland_PriceA></TD></TR>
<TR>
<TD style="WIDTH: 55px" vAlign=top align=middle><INPUT border=0 value="Price B" readOnly align=middle size=10 name=TreasureIsland_PriceB> </TD>
<TD style="WIDTH: 137px" vAlign=top align=middle><INPUT onkeyup="this.form.unmform_Total_TreasureIsland_PriceB.value =(this.form.unmform_Tix_Requested_TreasureIsland_PriceB.value - 0) * (29.00 - 0);calculate(this.form)" border=0 size=10 name=unmform_Tix_Requested_TreasureIsland_PriceB></TD>
<TD style="WIDTH: 100px" vAlign=top align=middle>$29.00</TD>
<TD style="WIDTH: 100px" vAlign=top align=middle><INPUT border=0 readOnly size=10 name=unmform_Total_TreasureIsland_PriceB></TD></TR>
<TR>
<TD style="WIDTH: 55px" vAlign=top align=middle><INPUT border=0 value="Price C" readOnly align=middle size=10 name=TreasureIsland_PriceC> </TD>
<TD style="WIDTH: 137px" vAlign=top align=middle><INPUT onkeyup="this.form.unmform_Total_TreasureIsland_PriceC.value = (this.form.unmform_Tix_Requested_TreasureIsland_PriceC.value - 0) * (19.00 - 0);calculate(this.form)" border=0 size=10 name=unmform_Tix_Requested_TreasureIsland_PriceC></TD>
<TD style="WIDTH: 100px" vAlign=top align=middle>$19.00</TD>
<TD style="WIDTH: 100px" vAlign=top align=middle><INPUT border=0 readOnly size=10 name=unmform_Total_TreasureIsland_PriceC> <INPUT type=hidden name=unmform_LineBreak6> </TD></TR>
Here is a sample of the code, Any and all help is greatly appreciated.
function calculate(what)
{
what.unmform_Total_Price_all.value =
(what.unmform_Total_TreasureIsland_PriceA.value - 0)
+ (what.unmform_Total_TreasureIsland_PriceB.value - 0)
+ (what.unmform_Total_TreasureIsland_PriceC.value - 0)
}
<TR>
<TD vAlign=top align=middle></TD>
<TD vAlign=top align=middle>
<P align=center><STRONG><FONT style="FONT-SIZE: 12px"><U>Treasure Island</U></FONT></STRONG></P></TD>
<TD align=middle>
<P align=left><U><FONT style="FONT-SIZE: 12px"><STRONG>10/23/11 @ 3:00pm</STRONG></FONT></U> </P></TD>
<TD align=middle> </TD></TR>
<TR>
<TD style="WIDTH: 55px" vAlign=top align=middle><INPUT border=0 value="Price A" readOnly align=middle size=10 name=TreasureIsland_PriceA> </TD>
<TD style="WIDTH: 137px" vAlign=top align=middle><INPUT onkeyup="this.form.unmform_Total_TreasureIsland_PriceA.value = (this.form.unmform_Tix_Requested_TreasureIsland_PriceA.value - 0) * (39.00 - 0);calculate(this.form)" border=0 size=10 name=unmform_Tix_Requested_TreasureIsland_PriceA> </TD>
<TD style="WIDTH: 100px" vAlign=top align=middle>$39.00</TD>
<TD style="WIDTH: 100px" vAlign=top align=middle><INPUT border=0 readOnly size=10 name=unmform_Total_TreasureIsland_PriceA></TD></TR>
<TR>
<TD style="WIDTH: 55px" vAlign=top align=middle><INPUT border=0 value="Price B" readOnly align=middle size=10 name=TreasureIsland_PriceB> </TD>
<TD style="WIDTH: 137px" vAlign=top align=middle><INPUT onkeyup="this.form.unmform_Total_TreasureIsland_PriceB.value =(this.form.unmform_Tix_Requested_TreasureIsland_PriceB.value - 0) * (29.00 - 0);calculate(this.form)" border=0 size=10 name=unmform_Tix_Requested_TreasureIsland_PriceB></TD>
<TD style="WIDTH: 100px" vAlign=top align=middle>$29.00</TD>
<TD style="WIDTH: 100px" vAlign=top align=middle><INPUT border=0 readOnly size=10 name=unmform_Total_TreasureIsland_PriceB></TD></TR>
<TR>
<TD style="WIDTH: 55px" vAlign=top align=middle><INPUT border=0 value="Price C" readOnly align=middle size=10 name=TreasureIsland_PriceC> </TD>
<TD style="WIDTH: 137px" vAlign=top align=middle><INPUT onkeyup="this.form.unmform_Total_TreasureIsland_PriceC.value = (this.form.unmform_Tix_Requested_TreasureIsland_PriceC.value - 0) * (19.00 - 0);calculate(this.form)" border=0 size=10 name=unmform_Tix_Requested_TreasureIsland_PriceC></TD>
<TD style="WIDTH: 100px" vAlign=top align=middle>$19.00</TD>
<TD style="WIDTH: 100px" vAlign=top align=middle><INPUT border=0 readOnly size=10 name=unmform_Total_TreasureIsland_PriceC> <INPUT type=hidden name=unmform_LineBreak6> </TD></TR>