Check at the Client End
by Paige Turner
JavaScript is very useful when it comes to checking HTML forms for valid entries. You can check that your visitors have filled in your forms correctly before they're transmitted over the Internet. The scripts are often activated when the Submit button is pressed. If there's a fault, they supress the transimission of the form contents and show an error message. Here's a selection of links to validation scripts and information. November 29, 2000
Using JavaScript To Control Forms - required fields Ensure that required fields are filled in by the user.
More on Controlling Forms - limiting characters Details on the Select element, plus Regular Expressions used to limit the kind of characters accepted in a field.
Phone Number Verification A sophisticated check for phone numbers. Since these might be long distance numbers or international numbers, the check's not too strict.
Client-Side Form Verification 2 Simple form data verification.
Client-Side Form Verification (Part 2) More from WebDeveloper.com
Detecting a Modifier Key Learn how to intercept modifiers, such as the Shift Key, in both browsers.
Implementing Read-Only Fields Learn how to blur a text field to avoid any editing.
Preparing a Form for User Corrections How to prepare a form for error correction by the user.
Form Validation How to check form fields before submission.
Disabling Form Elements Find out how to create disabled form elements, and how to enable them with JavaScript.
Is That Really an Email Address? Be sure you are getting real email addresses, not useless garbage.
Scripts for forms
Basic Validation A simple way to require visitors to fill out certain fields is to us this script.
Prevent users from selecting a filename with a space.
Email Address Validation
Make sure your visitor doesn't exceed a maximum number of characters
Ensure that visitors do not leave a form entry blank
How do I validate the form input before sending it to the server?
|