Wednesday, October 14, 2009
Limiting Textarea length
I just wrote a java script to limit the max length of a teaxtarea control.
Here is the code snippet.
Limiting Textarea length
<'textarea name="txaDescription" onkeypress="return maxLength(this, 250);" textarea>
and the javascript
function imposeMaxLength(Object, MaxLen)
{
return (Object.value.length <= MaxLen);
}
Here is the code snippet.
Limiting Textarea length
<'textarea name="txaDescription" onkeypress="return maxLength(this, 250);" textarea>
and the javascript
function imposeMaxLength(Object, MaxLen)
{
return (Object.value.length <= MaxLen);
}
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment