Solved

how to break a line in textarea

Posted on 2006-11-22
4
287 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
Comment Utility
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
Comment Utility
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
Comment Utility
<textarea onKeyUp="this.style.height=this.scrollHeight+10"></textArea>
0
 
LVL 7

Expert Comment

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
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.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

743 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

17 Experts available now in Live!

Get 1:1 Help Now