Forum Moderators: open

Message Too Old, No Replies

extended characters

writing them out

         

imaputz

1:11 am on Jun 10, 2004 (gmt 0)

10+ Year Member



can't seem to find a answer to this or figure it out.

what's the proper way of using extended characters in JS?

ex:


var currentPath = docPath + " » " + document.title;

so when I use the var I really get the double greater than sign.

thx.

Rambo Tribble

2:30 am on Jun 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The extended characters are HTML so you will only get them to display as the result of an operation like document.write(), or such. You can store the string that represents an extended character as a JavaScript variable, but it will have to go through the HTML interpreter before it renders.

imaputz

4:55 pm on Jun 10, 2004 (gmt 0)

10+ Year Member



ok, thx. I was using nodeValue to write out the var. I switched to innerHTML and it works.

DrDoc

5:24 pm on Jun 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or, you can just put the right angle quote (French style) directly in the JS.

var currentPath = docPath + " » " + document.title;