On 1/22/01, Mike Kear penned:
>I'm doing a calculator that involves users entering their annual income into
>an input field. So the gross income needs to be a numeric value.
>
>But if the user types in $36000, then the val(grossincome) function returns
>zero, because the first character isn't numeric.
>
>What's the easiest way to get the number out of an answer like that?
#rereplace(yourcurrencyfield, "[^0-9\.]+", "", "ALL")#
That will delete everything but decimals and numbers.
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists