You could do something like:

IsNumeric(Replace(form.dollars, ",","","all"))

That would remove any commas before applying the isNumeric test, so 1,000 
would be rendered as 1000 and pass the test (I think).

-- Josh



----- Original Message ----- 
From: "Rick Faircloth" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Monday, March 06, 2006 4:27 PM
Subject: RE: Ok, I give...how can I do this...


> Seems like I'll just have to give formatting instructions
> not to put any commas in a field...on numerals.
>
> But that's not intuitive for someone making an entry
> for $1,000,000...as 1000000...to difficult to tell
> how many zeros are there...much easier as 1,000,000
>
>> -----Original Message-----
>> From: Rick Faircloth [mailto:[EMAIL PROTECTED]
>> Sent: Monday, March 06, 2006 7:13 PM
>> To: CF-Talk
>> Subject: RE: Ok, I give...how can I do this...
>>
>>
>> You know...I tried using IsNumeric(Val(Form.Dollars)),
>> but found it was identifying a field entry of "wlekfjwlek"
>> as numeric...I assume it was assigning a value of "0"
>> to the entry and that is numeric...
>>
>> So that didn't weed out that kind of junk field entry
>> in my validation (which is what I'm working on here...
>> trying to validate an entry as a valid dollar entry.
>>
>> Rick
>>
>>
>> > -----Original Message-----
>> > From: Mike Kear [mailto:[EMAIL PROTECTED]
>> > Sent: Monday, March 06, 2006 7:00 PM
>> > To: CF-Talk
>> > Subject: Re: Ok, I give...how can I do this...
>> >
>> >
>> > No. numeral 1, comma, zero zero zero is a text string.  But if
>> you want to
>> > make it a numeric value you can use #val("1,000")# .     The
>> > val() function
>> > attempts to make a number out of whatever is in the string
>> > submitted to it.
>> >
>> > Cheers
>> > Mike Kear
>> > Windsor, NSW, Australia
>> > Certified Advanced ColdFusion Developer
>> > AFP Webworks
>> > http://afpwebworks.com
>> > ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
>> >
>> >
>> > On 3/7/06, Rick Faircloth <[EMAIL PROTECTED]> wrote:
>> > >
>> > > Should a field entry of "1,000" validate
>> > > as a numeric?
>> > >
>> > > e.g. IsNumeric(Form.Dollars)
>> > >
>> > > (Where Form.Dollars has a value of "1,000)
>> > >
>> > > Rick
>> > >
>> > >
>> >
>> >
>> >
>>
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234351
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to