We help IT Professionals succeed at work.

Displaying special characters in a textarea.

ashish_me2
ashish_me2 asked
on
Hi,
I want to display special characters (named entities) in a text area thru Javascript but am unable to do so because the character code e.g. #128 shows up as #128 (string) when populated thru Javascript, but displays correctly when put in between the <TEXTAREA> </TEXTAREA> tags.

Any suggestions to get arounnd this problem are welcome.

Thanx,
Ashish.
======
Comment
Watch Question

Top Expert 2013

Commented:
assuming a form name of myform and a textarea called thisbox then this works:

<a href="JavaScript:;" onClick="document.myform.thisbox.value='&#128;';return false;">
     click for special characters</a>

Cd&

Top Expert 2013
Commented:
That was the answer...

Cd&