Solved

Skip To Next Line In A textarea?

Posted on 1998-06-08
3
574 Views
Last Modified: 2008-03-03
How Can I Send A "Skip To New Line" Command In A textarea.
For Example:
document.testbox.text.value = document.testbox.text.value + "next line command" + newtext;
Please Let Me Know If And How This Can Be Done Or How Come This Can't Be Done.
otto

0
Comment
Question by:refr
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
cyberwizz earned 50 total points
ID: 1279680
You can use

\n   -   New line
\t    -   Tab

document.testbox.text.value = document.testbox.text.value + "\n" + newtext;
0
 

Author Comment

by:refr
ID: 1279681
I THought I Tried That But Aperently I Must Have Been Using /n Instead.
Thanks
0
 
LVL 2

Expert Comment

by:cyberwizz
ID: 1279682
It's a common mistake to do the other slash. In fact when I submitted the answer I almost put the wrong one down. :-)
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now