Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to break a line in textarea

Posted on 2006-11-22
4
Medium Priority
?
301 Views
Last Modified: 2008-02-01
Hello, when i browse by FireFox and type text in textarea, I cannot break a line. Which attribute do I need to set up in textarea??
0
Comment
Question by:portal123
  • 2
4 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 17998706
I don't know what you mean by not being able to break a line in Firefox. If you mean a huge long string without a space, try setting the wrap attribute to soft and see what happens.

If you're talking about Javascript putting line breaks into the textarea, you would use "\n"
0
 

Author Comment

by:portal123
ID: 17999099
I would like to got to a next line, when I reach the right end at textarea field.

<textarea name="test" cols="10" rows="2"></textarea>
0
 
LVL 7

Accepted Solution

by:
Yury Merezhkov earned 2000 total points
ID: 17999542
<textarea onKeyUp="this.style.height=this.scrollHeight+10"></textArea>
0
 
LVL 7

Expert Comment

by:Yury Merezhkov
ID: 17999611
Ok, if you type smth like this:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Yes, it won't wrap.

But if you try to type smth real like "Hello, World! This is my first HTML page!" it does wrap.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

916 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