Design News:
Form field Limiter v2.0
Form Field Limiter lets you limit the number of characters allowed in a INPUT or TEXTAREA element, plus display in real time the number of characters remaining.
Comments (5)
very nice!
But you may ask yourself, Self, “why the hell do I need this (which only counts characters) when I can get Jquery and do so much more?”
Well, you may not always want to download a 200k compatability Javascript library when all you have is the equivalent of a Hello World, what is your name web page! - or-you may be doing a page for a device with a very small footprint - like a Blackberry or a Windows CE browser that CANT load all the kitchen sink stuff we’ve come to love otherwise.
Finally, its a good entrypoint into learning Javascript, AND, as an anti-spam measure,you could have your char counting script activate a field or value when the input has reached a certain size - since bot scripts write directly to the post body and the form’s post target, they would not have updated the special value in the way a human typing would have, and the form will fail for those bots, blocking the spam w/o annoying questions or CAPTHA devices.
Of course, a user w/o Javascript may be rejected as a spammer under those rules, but for them, you could fall back and use the CAPTHA questions , if you like!
useless… js off, type in 1000 characters! pointless drivel…
Ok people, please keep things civil. The line is drawn at name calling.
@aguy
Just make sure you set the maxlength value in the input. Even with Javascript off, they won’t be able to type in more than the set limit. The only difference would be that no real-time update on how many characters they have left.
it is very useful articles i am recommended with my friends