Solved

how to break a line in textarea

Posted on 2006-11-22
4
294 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:
RealSnaD earned 500 total points
ID: 17999542
<textarea onKeyUp="this.style.height=this.scrollHeight+10"></textArea>
0
 
LVL 7

Expert Comment

by:RealSnaD
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

856 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