Doh...thank you Karl for saving my behind. Parse Int won't work...coffee
hadn't kicked in yet.
Cheers,
- Jonathan

On Mon, Oct 5, 2009 at 6:58 PM, Karl Swedberg <k...@englishrules.com> wrote:

>
> On Oct 5, 2009, at 11:43 AM, Jonathan Sharp wrote:
>
> You can run a parseint on the number: var myInt = parseInt( '15,000', 10);
> Cheers,
> - Jonathan
>
> http://jqueryminute.com
>
>
> Oops. that's not such a good idea. It'll return 15. ;-)
>
> There are probably much better ways of doing this, but one way is to use a
> regex replace:
> var someFormattedNumber = '15,000';
> +someFormattedNumber.replace(/\D/g,'')
>
>
> --Karl
>
> ____________
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>

Reply via email to