Online Forms

Programming, for all ages and all languages.
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Online Forms

Post by Neo »

how do i limit the number of characters entered in TEXTBOX and TEXTAREA elements of a webpage.
I tried using the maxlength="value" for TEXTBOX but IE's autocomplete easily filled in the text with size greater than the specified max value.
As for the TEXTAREA element the 'maxlength' does'nt even affect it.
So is it best to do this (at the client side) with Javascript? (Of course the server side script will have to check for this again)
Only Human
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Online Forms

Post by Neo »

Any ideas?
Only Human
ark

Re:Online Forms

Post by ark »

I'm not sure what the best way to handle that is. Technically, that could be viewed as a bug in Internet Explorer (even though it's a documented aspect of the text box in Windows).

Since you're planning on doing server-side checking in either case, it's up to you if you want to try to use a JavaScript client-side solution. It is generally better to prevent errors than to report them, so you may want to at least give the client-side thing a try.
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Online Forms

Post by Neo »

Is it possible to have 2 submit buttons (type="submit" not ordinary ones) for a single form? Each for a different purpose? Just asking no real reason.
Only Human
Post Reply