riday, February 14, 2003 5:30 AM
Subject: Re: best way to enter currency format
> Paul Hastings wrote:
> >>(say user is bidding $1,000.00)
> >>$1,000.00
> >>$1,000
> >>$1000
> >>1,000.00
> >>1,000
> >>1000
> >
> >
>
egards
Stephen
- Original Message -
From: <"Everett>; >
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 2:18 PM
Subject: RE: best way to enter currency format
> On input, I would get all of the numbers to a consistent format.
>
> First, I would
On input, I would get all of the numbers to a consistent format.
First, I would remove $ and ,
Then if there was anything left besides numbers and a . I'd throw an
exception. Probably the easiest thing for that is
... error code ...
If all passes, then put that value in the databas
Paul Hastings wrote:
>>(say user is bidding $1,000.00)
>>$1,000.00
>>$1,000
>>$1000
>>1,000.00
>>1,000
>>1000
>
>
> use currency datatype on the backend.
I would have said "Don't use currency on the backend" because it is not
an official datatype, but since you are using Access the correct
alt
> and might as well handle some of this on your input form
> with either cfform or some js validation.
Personally, I never rely on JavaScript for validating input unless I know
that the application will only be used in a semi-controlled environment,
such as an Intranet where browsers are standardi
> This will strip out anything but numbers and periods. You will probably
> want to also test for multiple periods before inserting, and possibly the
> number of digits after the period as well to ensure valid data.
and might as well handle some of this on your input form with either cfform
or so
> not sure how to strip out the non numbers from the form field?
> do u off hand know of any articles or tuts on it??
This will strip out anything but numbers and periods. You will probably
want to also test for multiple periods before inserting, and possibly the
number of digits after the period
o: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 1:17 AM
Subject: Re: best way to enter currency format
> > (say user is bidding $1,000.00)
> > $1,000.00
> > $1,000
> > $1000
> > 1,000.00
> > 1,000
> > 1000
>
> u
> (say user is bidding $1,000.00)
> $1,000.00
> $1,000
> $1000
> 1,000.00
> 1,000
> 1000
use currency datatype on the backend. strip out any "$" & "," from form
input. use dollarformat or whatever to display.
~|
Archives: http://
9 matches
Mail list logo