Simply add a replace() to your statement,
replace(passedvariable, ',', 'all')
This will remove ALL commas from the numeric value.
---------- Original Message ----------------------------------
From: "Jim Watkins" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Wed, 26 Jul 2000 19:55:19 -0700
>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>
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_community or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_community or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.