![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Northampton, UK
Posts: 1,090
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)
|
textarea.value and javascript modification causes a problem?
Hey, heres the story, i've been trying to create a "Snippet" inserter through bookmarks for quick edit textareas on forums such as this.
The general method i've been using to do this is: - Create a bookmark - Set the location to: Code:
javascript: void(document.getElementById('vB_Editor_QR_textarea').value=document.getElementById('vB_Editor_QR_textarea').value+"text to add goes here");
But (And heres the problem), it almost re-formats the box to remove all the carriage returns within the textArea... (for anyone with firefox) if you need to visualise the problem add this as a bookmark: Code:
javascript: void(document.getElementsByTagName("textarea")[0].value=document.getElementsByTagName("textarea")[0].value+"Read this thread and follow the instructions: http://www.techsupportforum.com/security-center/hijackthis-log-help/15968-important-read-before-posting-malware-removal-help.html");
So my question is this, is there a way (with javascript) to effectively append to a textarea with a set piece of text? without it removing all the carriage returns within the box. If anyone can help me i'd be very greatful... Cheers, Jamey |
|
|
|
![]() |
| Thread Tools | |
|
|