Textarea Prob - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Webmaster Support (https://www.supportforums.net/forumdisplay.php?fid=36) +---- Forum: Website Development (https://www.supportforums.net/forumdisplay.php?fid=43) +---- Thread: Textarea Prob (/showthread.php?tid=2617) |
Textarea Prob - Scorpion - 11-06-2009 What's Up? OK, So with my latest addition to my project, I need to be able to change the text of a textarea using JavaScript. I goggled around for ages but all the scripts I found didn't work. Anyone Know? Thanks Bye. RE: Textarea Prob - Gaijin - 11-06-2009 Ok as much as I could understand your need, you want to replace parts of the text inside the textarea. Here is a script that changes SF/Sf/sF/sf to SupportForums.net everytime a key is up. Code: <html> Read this here, http://www.tizag.com/javascriptT/javascript-string-functions.php RE: Textarea Prob - zone - 11-06-2009 You can also take a look at this : Code: onmouseover="functionToExecute('<some argument here for text area's text>')". a simple demo: http://www.webdeveloper.com/forum/archive/index.php/t-43687.html RE: Textarea Prob - Scorpion - 11-07-2009 Is it possible to change Code: <textarea tabindex="1" autocomplete="off" accesskey="u" name="status" id="status" rows="2" cols="40"/> To Code: <textarea tabindex="1" autocomplete="off" accesskey="u" name="status" id="status" rows="2" cols="40"/>What i want to say</textarea> Via javascript? If i got the working java script, I was hoping to put it into a firefox addon. RE: Textarea Prob - Gaijin - 11-07-2009 Yes it's possible, to acces the HTML form with JavaScript the form needs a name first. Code: <form name="someForm"..... Then you can create your text area and give it also a name, Code: <textarea name="someText"...... To control this form, all you need to do is call it by the name. Code: document.someForm.someText.value = "Textarea is controled by Aliens"; "value" is what you need. |