• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 621
  • Last Modified:

LIMIT TEXTAREA LENGHT

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
Evolutionmarketplace
Asked:
Evolutionmarketplace
1 Solution
 
eeBlueShadowCommented:
how about
if( this.value.length > 1000) this.value=this.value.substr(0,1000);

_Blue
0
 
EvolutionmarketplaceAuthor Commented:
PERFECT!!!!!.... THANK YOU VERY, VERY, VERY MUCH!!!!.... POINTS ARE YOURS :D

Pablo
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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