Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Your Email:

Ensuring Two Form Fields Have Identical Information

By Will Bontrager
2005-03-11


Ensuring Two Form Fields Have Identical Information

When two form fields must contain identical information before they can be submitted, this article shows you how to implement it.

A common implementation is for eliminating typographical errors in an email addresses.

The form asks the user to type an email address in two places. If they're not identical, the user is presented with an error message.

Another implementation is when specifying a password for future access. Here, a typographical error could prevent the user from accessing the area. Requiring the password to be re-typed reduces the chance for that type of error.

Whenever it's critical the information being provided is correct, you can ask the user to re-type it in a second form field. Those two fields can then be compared.

This article also shows how to check that two form fields are not identical.

Again using email addresses for an example, when the addresses of two friends are required, they can be checked to verify that the two are indeed different.

You'll find other uses for this, I'm sure.

Tutorial Pages:
» Ensuring Two Form Fields Have Identical Information
» The Form
» The JavaScript
» Integration Considerations
» Form Fields with Un-Identical Information


Copyright 2004 Bontrager Connection, LLC


 | Bookmark
Related Tutorials:
» JavaScript Debugging Techniques with Firebug
» Striped Tables Using JavaScript
» Opening PDFs in a New Window with JavaScript
» Essential Javascript -- A Javascript Tutorial
» Submit Forms Conditionally using JavaScript
» How to Setup a Randomising Function