Doug,

I see that Jon has already offered a solution, but here's another for you to
consider...JavaScript can be a lot of fun. :)

<cfset qty = 1>
<cfset itemPrice = 2>

<!doctype html public "-//w3c//dtd html 4.01 transitional//en"
"http://www.w3.org/tr/html4/loose.dtd";>
<html>

<head>
 <title>Line Item Calculation</title>
 <script type="text/javascript">
 <!--
  function calculateTotal() {
   var num = document.getElementById("qty").value * document.getElementById
("price").value;
   document.getElementById("total").value = num.toFixed(2);
  }
 //-->
 </script>
</head>

<body onload="calculateTotal()">
<cfoutput>
<table>
<tr>
   <td colspan="4" style="font-weight:bold;">Your Offer</TD></tr>
<tr>
   <td>Quantity: <input type="text" name="qty" id="qty" value="#qty#"
style="width:40px;" onkeyup="calculateTotal()"></td>
   <td>Unit Price: <input type="text" name="price" id="price"
value="#decimalFormat(itemPrice)#" style="width:50px;"
onkeyup="calculateTotal()"></td>
   <td>Total Price: <input type="text" name="total" id="total" value=""
style="width:60px;"></td></tr>
</table>
</cfoutput>
</body>

</html>
Enjoy...
Dina


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266509
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to