Text Limit
General
This script will only allow a set number of characters to be entered into a text field and then focus on the next element. Easy to implement.
This form is formatted for a social security number (XXX-XX-XXXX).
Notes
- Created by: Mr. J
- Web Site: http://www.huntingground.net
- Posted: May 21, 2008
The limit for each individual field is passed to the function by the appropriate input event, as shown in the form using the format: onKeyUp="advance2('currentField','nextField',limit)"
Source Code
Paste this source code into the designated areas.
External file
Paste this code into an external JavaScript file named: textLimit.js
Head
Paste this code into the HEAD section of your HTML document.
Body
Paste this code into the BODY section of your HTML document


Leave a Response
(0 comments)