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
Solved

Disable horizontal scrolling of textarea in Netscape 6.2 and above

Posted on 2004-04-07
11
1,881 Views
Last Modified: 2012-06-27
I have a textarea for which when the text exceeds the length of the textarea the text should come down to the next line without any horizontal scroll bars appearing. This is the default behaviour in IE but in Netscape whenever the text exceeds the length of the textarea, horizontal scrollbars appear (which i do not appear).Please advise.
0
Comment
Question by:srnambiar
  • 3
  • 2
  • 2
  • +1
11 Comments
 
LVL 2

Expert Comment

by:dgooding
ID: 10774736
http://www.htmlref.com/reference/appa/tag_textarea.htm
 
IE - wrap="off | physical | virtual"
NS - wrap="hard | off | soft"

In some versions of Netscape and Microsoft browsers, this attribute controls word-wrap behavior. A value of off for the attribute forces the <textarea> not to wrap text, so the viewer must manually enter line breaks. A value of hard causes word wrap and includes line breaks in text submitted to the server. A value of soft causes word wrap but removes line breaks from text submitted to the server. Internet Explorer supports a value of physical, which is equivalent to Netscape's hard value, and a value of virtual, which is equivalent to Netscape's soft value. If the wrap attribute is not included, text will still wrap under Internet Explorer, but older versions of Netscape, notably Netscape 4, will scroll horizontally in the text box. Given this problem, even though it is nonstandard, it may be a good idea to include the wrap attribute.

<textarea name="comment" rows="10" cols="40" wrap="virtual" align="center"></textarea>
0
 

Expert Comment

by:fightbulc
ID: 10774870
Hi,

just use the "wrap"-attribute for the textarea. I.E.:
<textarea name="virtual" cols="30" rows="3" wrap="virtual">

This breaks automaticly the line at the end of the textarea.
There are 4 values for the wrap-attribute: soft, hard, virtual and physical.
Soft and Virtual are the same, the difference is that soft only works for netscape. Virtual works also for IE4+ and NS2+.
The same thing for hard and physical. And if you send this textarea to a formular, hard and phsical will send also the linebreaks. Soft and Virtual wont do this!

Netscape developed this attribute to break lines in textareas.
But this is not W3C conform, cause for the W3C the lines should break automaticly without any attributes!

Hope I could help.
Bye fightbulc

0
 
LVL 1

Expert Comment

by:ch3rryb0mb
ID: 10779949
could you just say add an attribute "hscrolling=0" or no or something like that. i dunno just a thought.

gl
-char
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Expert Comment

by:fightbulc
ID: 10782021
Nope, there is no attribute like this.

Greetings
fightbulc
0
 

Author Comment

by:srnambiar
ID: 10783001
The wrap attribute is not working in Netscape 7 - The horizontal scroll bars still appear even if I set wrap="soft" or wrap="hard" . My main intention is to get rid of these horizontal scroll bars in Netscape and instead get the vertical scroll bars when text exceeds the length of the textarea.
0
 
LVL 2

Expert Comment

by:dgooding
ID: 10783132
http://www.web-wise-wizard.com/html-tutorials/html-form-forms-textarea-wrap.html

Go here and find the type of textbox you're after.  (My guess is "virtual").
0
 
LVL 1

Expert Comment

by:ch3rryb0mb
ID: 10787851
ha, ok ,well there should be

peace
-char
0
 

Author Comment

by:srnambiar
ID: 10790853
Netscape 7 does not adhere to the formatting applied by the wrap="virtual" atrribute.
0
 
LVL 2

Accepted Solution

by:
dgooding earned 125 total points
ID: 10790928
you could write a script that would determine browser type, then use virtual/soft accordingly...  
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

808 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