Solved

how to break a line in textarea

Posted on 2006-11-22
4
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

623 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