Re: TEXTAREA form field

by "rudy" <r937(at)interlog.com>

 Date:  Fri, 2 Feb 2001 18:03:03 -0500
 To:  "Davies,
Elizabeth H." <EHDavies(at)West.com>,
"HWG-technique Mailing List (E-mail)" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
> Is there a way to limit the number of characters
> (client side) that go into a TEXTAREA box?

hi elizabeth

not sure, but i don't think so

not without javascript

> Our database limit is 256 characters, and while we have it
> limited on the db side, I'd like to be able to let the person
> filling out the form when they've hit the end.

good call on the database limit

i'm sure i've seen posts on this topic before (could have been another
list, i'm on about eight of them), but i wasn't really paying attention at
the time

seems to me the user would have to get out of the textarea, move the cursor
(focus) to some other field, otherwise javascript cannot detect
individual characters as they are being typed in (can it?)

but you could certainly use onBlur and do a check of the length at that
time, right?

hey, how about a button beside the textarea that said "check length" and an
explanation that the user could use the button to make sure none of the
text entered will get truncated upon submission


rudy.ca

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA