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

Ensuring Two Form Fields Have Identical Information

By Will Bontrager
2005-03-11


Form Fields with Un-Identical Information

To ensure that two form fields contain different instead of identical information, one change needs to be made in each JavaScript function.

Where you find

if(one == another) { return true; }
change it to

if(one != another) { return true; }


Changing "==" to "!=" causes the code to compare for inequality instead of comparing for equality.

Optionally, change the alert message and the JavaScript function name as appropriate for the changed code.


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