[thelist] Textarea
Joshua OIson
joshua at alphashop.net
Tue Jun 26 11:29:34 CDT 2001
You can do it via javascript:
function countChars(obj, len)
{
if (obj.value.length >= len) obj.value = obj.value.substring(0,len);
document.all[obj.name + 'Count'].innerText = obj.value.length;
return (obj.value.length < len) ? true : false;
}
<TEXTAREA name="intro" onkeyup="return countChars(this, 250)"></TEXTAREA>
This works with IE 4.0+ and maybe others, though I doubt it.
-joshua
----- Original Message -----
From: "Salvatore Palmisano" <spalmisano at usaiss.com>
Subject: [thelist] Textarea
: Is there any way to set the MAXLENGTH property of the textarea tag?
: Simply adding MAXLENGTH=x to the tag doesnt seem to do anything.
: Is this possible?
:
: Thanks.
: --Sal
More information about the thelist
mailing list