Can anyone tell me why the following code from CFWebstore rounds numbers to 
the nearest 1?

INPUT:

<cfinput type="Text" name="Wholesale" value="#iif(GetProduct.Wholesale IS NOT 
0, DE("#Trim(NumberFormat(GetProduct.Wholesale, '_________.__'))#"), 
DE(""))#" size="7" maxlength="15" validate="float" message="Wholesale Price 
must be a number!">

ACTION:

<cfif NOT len(Trim(Weight))>
        <cfset Weight = 0>
<cfelse>
        <cfset Weight = #LSParseNumber(Weight)#>
</cfif>

-- 
Jon Tillman
www.smokingpipes.com
www.tobaccoreviews.com
www.eruditum.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to