Just wondering what the easiest way might be to complete the following task
I have a client that has requested that they display an order form on their
website.
Basically they want the form to look like the following:
Product Name Price QTY Total
Product 1 3.00 2 6.00
Product 2 5.00 1 5.00
Product 3 6.00 3 18.00
Total 29.00
Developing the form is easy - just wanting to know what the best way would be
to do the calculations in the form prior to the user submitting the form.
Thanks in advance
Here is the code that I have so far:
<form action="##" id="orderform1">
<cfoutput>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>Product</th>
<th>Description</th>
<th>Unit Price </th>
<th>Quantity</th>
<th>Subtotoal</th>
</tr>
<tr>
<td>Product 1 </td>
<td>Prod 1 desc </td>
<td align="center">3.00</td>
<td align="center"><input name="qty1" type="text" value="#1#" size="3"
onBlur="cleanField(this)"></td>
<td align="center">3.00 * qty1 </tr>
<tr>
<td>Product 2 </td>
<td>Prod 2 desc </td>
<td align="center">5.00</td>
<td align="center"><input name="qty2" type="text" value="##" size="3"
onBlur="cleanField(this)"></td>
<td align="center">5.00</td>
</tr>
<tr>
<td>Product 3 </td>
<td>Prod 3 desc </td>
<td align="center">6.00</td>
<td align="center"><input name="qty3" type="text" value="##" size="3"
onBlur="cleanField(this)"></td>
<td align="center">18.00</td>
</tr>
<tr>
<td align="center">Total</td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center">29.00</td>
</tr>
<tr>
<td align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
</table>
</cfoutput>
</form>
Thanks in advance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312735
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4