0
   

Writing special characters in textareas (JavaScript)

 
 
Reply Fri 21 May, 2004 04:09 pm
How do I write &# characters in textareas with javascript? This won't work:

Code:
<HTML>
<HEAD>
<SCRIPT>
function load()
{
document.text.textarea.value = "The character is : &\#100;"; //Delete the '\'
}
</SCRIPT>
</HEAD>
<BODY onload="load()">
<FORM name="text">
<TEXTAREA name="textarea">
</TEXTAREA>
</BODY>
</HTML>


What this should do is make a textbox with the &#\100; (no '\') character ('d') in it, but it doesnt...

EDIT: I think this is a lot easier in VBscript so I might try it in there.
EDIT2: Oh damn, not everyone has VB!
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 0 • Views: 5,374 • Replies: 1
No top replies

 
rartavia
 
  1  
Reply Fri 8 May, 2009 01:37 pm
@TechnoGuyRob,
Try
textarea.value = "the character is: " + String.fromCharCode(100);
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Writing special characters in textareas (JavaScript)
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/08/2024 at 06:12:25