Click to See Complete Forum and Search --> : Currency Format while tipping


klou91
September 10th, 2004, 04:30 AM
Is it possible to put a space after the thousands in a textarea while the user is typing his number:
user types : "1000"
user sees : "1 000" and it's justified at the rigth.

Vanny
September 20th, 2004, 03:49 AM
two ways i can think of, now i havent done much research into this

1. create a seperate input box for each group of units.

eg ___ ___ ___
100 000 000

and use on change to move between each box once their are 3 digits in it.

2. you could write a javascript function to to go though number and add a space after each group of 3 digits when string is longer than 3. with out seeing the page you are trying to do this in its a bit hard to give any more details.

klou91
September 21st, 2004, 06:33 AM
Thank's for your answer... I guess your second idea seems quite good... I'll try it!

Vanny
September 21st, 2004, 08:12 PM
Let me know how you go, it would be a little complex but im sure it is doable.