Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #22647

Re: Removing ' ' from strings ??

From "Mel Smith" <med_cutout_syntel@aol.com>
Newsgroups comp.lang.javascript
Subject Re: Removing '&nbsp;' from strings ??
Date 2014-01-16 13:37 -0700
Message-ID <bjqu8rFtvtnU1@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> <bjqegcFqgpcU1@mid.individual.net><0.ae3d2a008e8309f72c9a.20140116161844GMT.87ob3blx23.fsf@bsb.me.uk><bjqit9Frfe7U1@mid.individual.net> <bjqjjpFrkm6U1@mid.individual.net> <lb9b7c$7p1$1@dont-email.me>

Show all headers | View raw


Denis said:
>> textstr = option.text ;
>
> option.text may not be the same as option.innerHTML, especially if the
> html contains entity codes. I suspect the issue is that the html entity
> codes have been translated into some other encoding scheme (ie other than
> html entity encoding) in the text string that you're getting back as the
> value of option.text.

Hi Denis:

    I ave simple text (with the inclusion of &nbsp;  codes, and MArtin's 
solution resolves everything nicely. IE* and Chrome react exactly the same.

    I tried 'innerHTML' for a few minutes, and came up with the long string 
of chars interspersed with &nbsp;

    So, back to Martin's solution.

Thanks to all !

-Mel

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-15 15:23 -0700
  Re: Removing '&nbsp;' from strings ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-15 23:35 +0100
    Re: Removing '&nbsp;' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-15 23:44 +0000
      Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-15 17:07 -0700
        Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 09:08 -0700
          Re: Removing '&nbsp;' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-16 16:18 +0000
            Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 10:23 -0700
              Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 10:35 -0700
                Re: Removing '&nbsp;' from strings ?? Martin Honnen <mahotrash@yahoo.de> - 2014-01-16 18:58 +0100
                Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 11:05 -0700
                Re: Removing '&nbsp;' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-16 18:01 +0000
                Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 11:10 -0700
                Re: Removing '&nbsp;' from strings ?? Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-16 19:17 +0000
                Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 13:37 -0700

csiph-web