Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Remove Textbox element ScrollBar

Posted on 2001-08-06
11
Medium Priority
?
475 Views
Last Modified: 2008-02-01
How can the scrollbar of the <TEXTBOX> element be removed?
0
Comment
Question by:dog78
[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
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 15

Expert Comment

by:a.marsh
ID: 6355766
You mean <textarea>?

Well if the text within the textarea is too much to show then the browser will automatically add a scrollbar.

As far as I know there is no way of stopping that.

Ant
0
 

Author Comment

by:dog78
ID: 6355855
Sorry, yes, <TEXTAREA>.

The textbox is currently empty. Yet it draws a shadowed scrollbar (just like the Comment Input box here on this site). Is there a way to remove that?
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6355867
Only in some browsers - for example I'm using Opera and there is no scrollbar at all (unless it needs one).

Are you using Netscape by any chance?

Again, I'm pretty sure the answer is "no". Sorry.

Ant
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:dog78
ID: 6356062
I'm writing this for use on the Active Desktop. So, I guess that would be considered IE. Do I have other options for a large input area without a scrollbar? I'm looking for the ability to control the styles of the input form, and TextArea allows this.
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6356099
In what way are you using the textarea, perhaps there is an alternative we could suggest?

Ant
0
 
LVL 1

Expert Comment

by:Ernest022699
ID: 6356741
(Sigh) Browsers are designed for ease of use by end users.  Leave the scrollbars alone; people expect their browsers to behave the way THEY like them, not as some developer thinks the screen should look.

HTML is for providing content, not managing screen design.
0
 
LVL 3

Accepted Solution

by:
nzjonboy earned 200 total points
ID: 6357285
dog78, there is a work around for this. what you can do is set the overflow property for the textarea to hidden, this will remove the scroll bars in ie. then al you need is a a script to check the number of characters entered do not exceed the limit of what is visible. heres and example

<html>
<head>
<script language="javascript">
   function textCounter(field, maxlimit) {
          if (field.value.length > maxlimit) {
               field.value = field.value.substring(0, maxlimit);
          }
   }
</script>
<style>
     textarea {
          overflow:hidden;
     }
</style>
</head>
<body>

<textarea name="text1" cols=50 rows=2 onKeyDown="textCounter(this,100);" onKeyUp="textCounter(this,100);"></textarea>

</body>
</html>

hope this helps

nzjonboy
0
 
LVL 10

Expert Comment

by:dij8
ID: 6357598
nzjonboy (fellow kiwi per chance?), you beat me to it.

To confirm, the way to do this is in fact using the style overflow=hidden.  It is IE only.  Nice touch with the character count nzjonboy.
0
 
LVL 3

Expert Comment

by:nzjonboy
ID: 6357635
thanks dij8, yup kiwi indeed. very nice site btw.
0
 

Author Comment

by:dog78
ID: 6359544
Ernest, I share in your view. I do not agree with websites which take too much control of the browser. However, I'm working on code which is to be used on the -desktop- as a background. The intended audience would be the few employees here at the office. I simply wish to remove the scrollbar because there will never be more than a screen full of text. I know this, so I wish to remove the unnecessary scrollbars. If I can't do that, I'll try to style them so that they'll at least match the background, but removal would be best.
0
 

Author Comment

by:dog78
ID: 6359573
That's just beautiful, nzjonboy. Thanks.
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!

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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 the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

721 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