Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #22638
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Removing ' ' from strings ?? |
| Date | Thu, 16 Jan 2014 09:08:38 -0700 |
| Lines | 44 |
| Message-ID | <bjqegcFqgpcU1@mid.individual.net> (permalink) |
| References | <bjog40Fe7h5U1@mid.individual.net><XnsA2B6F00B7DFE3eejj99@194.109.133.133> <0.14085b2fab6b953fb903.20140115234423GMT.87bnzcolns.fsf@bsb.me.uk> <bjom61FfeukU1@mid.individual.net> |
| X-Trace | individual.net 5FqTJJrUtWPS2lLjeUzYmgPyDbDC/6HY1pyihF9c/a3OhZZRUo |
| Cancel-Lock | sha1:DkH8uWWmjVaXuGa9OHnrK9Vn0QA= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-MIMEOLE | Produced By Microsoft MimeOLE V6.00.2900.6157 |
| X-RFC2646 | Format=Flowed; Response |
| Xref | csiph.com comp.lang.javascript:22638 |
Show key headers only | View raw
Hi All:
My IE8 still won't change the nbsp; coding to spaces altho Chrome does
so.
Below is my actual latest test code
and here is the definition of my alltrim() function
function alltrim(str) {
return str.replace(/^\s+|\s+$/g,"") ;
}
Thanks
-Mel Smith
********* latest test code *************
option = el.options[nindex] ; // text string with multiple 'nbsp;' in it
textstr = option.text ;
textstr = textstr.replace(/nbsp;/g," ") ; // change nbsp; into space
globally
// get the clubname first
npos1 = textstr.search("Tees") ;
clubname = textstr.substring(0,npos1) ;
alert("a. Code at start= " + clubname.charCodeAt(0)+" Code at end=
"+clubname.charCodeAt(clubname.length-1)) ;
clubname = alltrim(clubname) ; // trim spaces off of the ends of the
clubname
alert("b. Code at start= " + clubname.charCodeAt(0)+" Code at end=
"+clubname.charCodeAt(clubname.length-1)) ;
// in both alerts above the chars at the start and end are Unicode 160
(unbreakable space) for IE8
alert("clubname=**"+clubname+"** Len = "+clubname.length) ;
***********************************
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Removing ' ' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-15 15:23 -0700
Re: Removing ' ' from strings ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-15 23:35 +0100
Re: Removing ' ' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-15 23:44 +0000
Re: Removing ' ' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-15 17:07 -0700
Re: Removing ' ' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 09:08 -0700
Re: Removing ' ' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-16 16:18 +0000
Re: Removing ' ' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 10:23 -0700
Re: Removing ' ' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 10:35 -0700
Re: Removing ' ' from strings ?? Martin Honnen <mahotrash@yahoo.de> - 2014-01-16 18:58 +0100
Re: Removing ' ' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 11:05 -0700
Re: Removing ' ' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-16 18:01 +0000
Re: Removing ' ' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 11:10 -0700
Re: Removing ' ' from strings ?? Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-16 19:17 +0000
Re: Removing ' ' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 13:37 -0700
csiph-web