[jQuery] Re: format number

2009-10-06 Thread Jonathan Sharp
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 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',

[jQuery] Re: format number

2009-10-05 Thread Karl Swedberg
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

[jQuery] Re: format number

2009-10-05 Thread Jonathan Sharp
You can run a parseint on the number: var myInt = parseInt( '15,000', 10); Cheers, - Jonathan http://jqueryminute.com On Sun, Oct 4, 2009 at 7:49 AM, runrunforest wrote: > > cool, but that leads to another problem > > The computer now thinks 15,000 is just 15 instead of fifteen thousands

[jQuery] Re: format number

2009-10-05 Thread RobG
On Oct 5, 12:13 am, Donny Kurnia wrote: [...] > 15,000 should only displayed to user. You should keep 15000 somewhere in > the document. My favorite is using alt > > 15,000 alt is not a valid attribute for span elements. -- Rob

[jQuery] Re: format number

2009-10-04 Thread Donny Kurnia
runrunforest wrote: cool, but that leads to another problem The computer now thinks 15,000 is just 15 instead of fifteen thousands. I need the formated number for later calculation, I have to make the computer think 15,000 is actually fifteen thousands Is there anyway to take the comma out bef

[jQuery] Re: format number

2009-10-04 Thread runrunforest
cool, but that leads to another problem The computer now thinks 15,000 is just 15 instead of fifteen thousands. I need the formated number for later calculation, I have to make the computer think 15,000 is actually fifteen thousands Is there anyway to take the comma out before calculation or a f

[jQuery] Re: format number

2009-10-04 Thread runrunforest
cool, but that leads to another problem The computer now thinks 15,000 is just 15 instead of fifteen thousands

[jQuery] Re: format number

2009-10-04 Thread Donny Kurnia
runrunforest wrote: How can i make 1500 look like 15,000,000 and 1500.00 look like 15,000,000.00 ? You can use this: http://phpjs.org/functions/number_format:481 -- Donny Kurnia http://blog.abifathir.com http://hantulab.blogspot.com http://www.plurk.com/user/donnykurnia

[jQuery] Re: Format number with pattern

2008-10-31 Thread MorningZ
Theres tons of Javascript solutions http://www.google.com/search?q=javascript+format+number&ie=utf-8&oe=utf-8&aq=t (which jQuery would do under the hood anyways) On Oct 31, 4:21 pm, ipazmino <[EMAIL PROTECTED]> wrote: > Hi, > > I need to format a number as specified in a input pattern, Someth