[Javascript] The Non-Breaking Space of Doom
Andrew Crawford
javascript at evermore.com
Tue Jan 10 14:50:44 CST 2006
Triche Osborne wrote:
> Andrew Crawford wrote:
>> When JavaScript generates the select list, it displays like the second
>> example above (Example 2) instead of the first (Example 1). That is, it
>> actually displays " " instead of putting a non-breaking space
>> character.
>
>
> I ran into a similar problem with the double left angle bracket while
> trying to append a DOM-style error message in a JavaScript class. The
> instructor told me it would be necessary to use the escaped Unicode
> equivalent for that character. It worked beautifully. You might try it
> here: It would be \u00A0 for the non-breaking space.
>
> Triche Osborne
Thank you for the suggestion.
I ended up with odd results from that, too. Someone else I was working
with said they got that to work but, I couldn't reproduce it.
I think the CSS solution (mentioned in my previous post) is the right
way to go with this.
Andrew Crawford
More information about the Javascript
mailing list