Try this

<cfset unitCost=Replace(form.UnitCost,",","","ALL")>

Then instead of referencing form.UnitCost use unitCost instead...


-----Original Message-----
From: Jim Watkins [mailto:[EMAIL PROTECTED]]
Sent: 27 July 2000 12:54
To: [EMAIL PROTECTED]
Subject: comma problem


Below is part of a form I use to simply multiply a quantity times unit cost.
The problem is that when the customer keys in a comma as in 4,000 instead of
4000 a multiplication error occurs.  I get an answer but it is way wrong.
What can I do to strip the comma out???


<tr>
<CFIF Len(Trim(form.qty1)) AND Len(Trim(form.unitcost1))>
<cfset form.totalcost = #form.qty# * #form.unitcost#>
<td><input name="unitcost" value="#form.unitcost#"></td>
</tr>
</CFIF>

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to