Home

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!

#1: Mark on 02/25 at 11:52 AM

useless… js off, type in 1000 characters! pointless drivel…

#2: aguy on 02/25 at 09:15 PM

Ok people, please keep things civil. The line is drawn at name calling.

#3: georgec on 02/26 at 05:46 AM

@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.

#4: Shaw on 03/02 at 07:39 PM

it is very useful articles i am recommended with my friends

#5: kitchan design on 03/18 at 11:17 AM
Commenting is not available in this weblog entry.

News Tools &
Other Resources

CSS Compressor

Use this tool to compress your CSS code, with three levels of compression to choose from!

CSS AutoPrefixer

Intelligently add CSS vendor prefixes to your CSS code. Just paste and copy!

Image to Color Palette Generator

Get the primary colors of any image in hex format with this online tool!

Image Optimizer

Use this tool to easily optimize regular gifs, animated gifs, jpgs, and pngs, so they load as fast as possible.

Button Maker

Use this tool to easily create those popular 80x15 micro buttons you see on web sites everywhere.

FavIcon Generator

Generate a favicon using any regular image with this tool. A favicon is a small, 16x16 image that is shown inside the browser's location bar and bookmark menu when your site is viewed.

Ribbon Rules Generator

Create alternating colored horizontal rules quickly with this new Web 2.0 tool.

.htaccess Banning Generator

Generate the necessary .htaccess code to ban visitors based on their IP address, referrals, or disable hotlinking on the desired file types on your server, such as images.

.htaccess Password Generator

Generate all the necessary codes needed to password protect a directory or selects files within it on your site using .htaccess.



Partners & ResourcesOur
Partners


CSS Forums News

Dynamic Drive forums | Register

The Latest Comments

All images and content copyright © 2017 CSS Drive. Contact Info | Back to Top
Affiliate Discloser: We receive a commission from purchases through some links on this site