Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

how to break a line in textarea

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
portal123
Asked:
portal123
  • 2
1 Solution
 
ZylochCommented:
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
 
portal123Author Commented:
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
 
Yury MerezhkovDevelopment Team LeadCommented:
<textarea onKeyUp="this.style.height=this.scrollHeight+10"></textArea>
0
 
Yury MerezhkovDevelopment Team LeadCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now