Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to concatenate &bnsp; 1

Status
Not open for further replies.

jaschulz

Programmer
May 20, 2005
89
FR
I need to build a string like this:

str = "1.  some other text";

This string will become the content of a new textnode (of a <p> element), but when I try the above, I get the literal characters &nbsp; rather than a non-breaking space.

What's the right way to do this?

Thanks,

James
 
That doesn't work. \u0020 gives a "regular" space (and even if I use five of them, the browser gobbles them up and spits out only one space in the document), not the HTML non-breaking space that I need.

There as to be a way to do this (I hope). But so far (and I have been chasing around on the web for a couple hours) I haven't been able to find it.

Any other ideas?

Thanks,

JAS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top