Solved

LIMIT TEXTAREA LENGHT

Posted on 2004-05-01
2
613 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
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

810 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