Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM: Currency Validation in Javascript

date posted 1st June 2007 17:46

On Thursday 31 May 2007 8:01 pm, James Herrington wrote:
> >Am I right these snippets are looking for either
> >"abc" or "abc.de" (where "abc" is one or more digits)?
>
> Yer thats right. How would you do it with just plain javascript?

First check if it's numeric; if not then check the third from last=20
character is a "." and that the remaining bits are numeric.

But it turns out that Javascript doesn't have a built-in isnumeric().

Evil sucky language.

And a quick Google throws up lots of evil sucky broken implementations
of IsNumeric().

> I was thinking about looping through each character but is it really an=
y
> more efficient? Also the .indexOf() function could be used to find the

Whatever happens you're going to be looping through the string one=20
way or another.

--=20
5: When responding to a post, delete all information that is not
strictly necessary. This includes the freelancers tag line and .sig
files. Delete anything you're not specifically responding to.



Messages by Day
June 30th 2007
June 29th 2007
June 28th 2007
June 27th 2007
June 26th 2007
June 25th 2007
June 24th 2007
June 23rd 2007
June 22nd 2007
June 21st 2007
June 20th 2007
June 19th 2007
June 18th 2007
June 17th 2007
June 16th 2007
June 15th 2007
June 14th 2007
June 13th 2007
June 12th 2007
June 11th 2007
June 10th 2007
June 9th 2007
June 8th 2007
June 7th 2007
June 6th 2007
June 5th 2007
June 4th 2007
June 3rd 2007
June 2nd 2007
June 1st 2007


Messages by Month
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000