Solved

LIMIT TEXTAREA LENGHT

Posted on 2004-05-01
2
616 Views
Last Modified: 2012-06-27
Hi Experts!

It is possible to limit the textarea lenght in the same http line in which the textarea is defined (without calling a JS function)?

I am using this:

<textarea name="Customer_Comment" cols="109" rows="15" id="textarea" onkeyup='this.value=this.value.substring(0,1000);'></textarea>

with the event KEYUP, and works fine... but the problem is that is impossible to modify entered text :...(

Thanks in advance,

Pablo.
0
Comment
Question by:Evolutionmarketplace
[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 Comments
 
LVL 10

Accepted Solution

by:
eeBlueShadow earned 500 total points
ID: 10969667
how about
if( this.value.length > 1000) this.value=this.value.substr(0,1000);

_Blue
0
 

Author Comment

by:Evolutionmarketplace
ID: 10969678
PERFECT!!!!!.... THANK YOU VERY, VERY, VERY MUCH!!!!.... POINTS ARE YOURS :D

Pablo
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

729 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