Click to See Complete Forum and Search --> : White space (tabs) elimination


sawadee
05-06-2007, 07:48 AM
Hi all ..... !

I am developing an XHTML application that pulls data variables out from a Javascript array and places the words into a textbox. The variables are automatically displayed with about 10 white spaces between them.

How can I eliminate these spaces and display the variables with only 1 space ?

Thanks for your assistance.
Sawadee

mrhoo
05-06-2007, 08:53 AM
value=string.replace(/\s+/g,' ');

sawadee
05-06-2007, 11:01 PM
Thanks MrHoo ..... I will work on that. In the meantime I would appreciate if you could provide me with some sample code.

Thanks for your cooperation.
Sawadee