J.J.Baxter - My place on the web - interests, hobbies, thoughts & ruminations
Home / Blog
Books
Links
Images
Aug Sep-2010 Oct
SMTWTFS
2930311234
567891011
12131415161718
19202122232425
262728293012
3 4 5 6 7 8 9
Reset Calendar
Snorg Girls
Programming Tips
Sherlock Holmes
Mythbusters
Gallipoli
Nova Science Now
Ajax Loading Images
The Girls of Dr. Who
Keratosis Pilaris (KP)
Amazing Water
Buy me a drink? I'll have a Cappuccino, thanks.
Random Images
Random Link
Newcastle TV Guide #1
Random Book
Rebecca
by Daphne Du Maurier






All Rights Reserved 2008
JJBaxter.com

J.J.Baxters Development Tips & Snippets
backBack
 remove rendered   spaces from a string (JavaScript : 22-Oct-2007)
This was tricky. I format telephone numbers using  . This was fine except when being sumbited in a edit form. I needed to filter the spaces as part of an isNumeric function. Filtering spaces was easy

strString = strString.replace(/ /g, ""); // remove spaces

but filtering    took a while. Finally found the answer on the linked page

strString = strString.replace(/\xA0/g, ""); // remove non-break spaces ( )


The hex code for a rendered   is xA0 or 160 decimal
Ref Link: http://www.thescripts.com/forum/thread170794.html