[thelist] Form tags and Text Fields

Billy Hutton BillyH at phx.effectnet.net
Tue Jan 30 11:07:32 CST 2001


MAXLENGTH is an <INPUT TYPE="TEXT"> attribute that you can set.  It does not
affect the "size" of the box.  That's the size attribute.  :p  But anyway...
MAXLENGTH should work fine in both browsers.  You could have an address form
with all the size attributes of the input tags set the same so the form
looked nice, but use the maxlength attribute to only allow 2 characters for
the state field, and 5 characters for the zip code.  (Just an example...)

It's been around since version 3 of both I believe.  You can check that type
of thing here; http://utopia.knoware.nl/users/schluter/doc/tags/index.html.

BTW, in previous replies your message mentioned having problems with spaces.
You can do client side regex with JavaScript to strip characters, or if
you'd like to keep things a bit more browser independent, submit the form to
itself, do server side input scrubbing with some ASP, and then redirect or
post the data to another page.  ;)

- Billy

-----Original Message-----
Can you help me then, and tell me how to set the form object "text field"
character length in CSS? Or is length specified in pixels? I'm sure I'd
figure it out, but you could save me a bit of time...




More information about the thelist mailing list