Home / Free JavaScripts / Forms / Here

Website Abstraction

Cut & Paste Max # of characters check

Credit: Website Abstraction

Description: A script that checks the number of characters in a form box, and if it exceeds the predetermined number, cancels the form submission, and asks the surfer to reenter data.

Example:

In 50 chars or less, please type a short description of yourself:

Directions: Simply cut and paste the below code into the <body> section of your page. It contains a form with one textarea box that is checked for max # of characters. You can change this # from the default 50 to another by changing "var maxlength" below. You can add in more form elements into the form, as you would with any other form.



spacer.gif (810 bytes)

.
CopyRight © 1997-2001 Website Abstraction. All rights reserved


spacer.gif (810 bytes)