Categories

Updated: 03/18/2004

Form Validation

This is a simple form validation script that checks for empty fields. Dreamweaver offers very little in JavaScript form validation unless you''re using Cold Fusion. In my opinion the built-in form validation behavior in Dreamweaver is sloppy and not user friendly. This script creates required fields and makes sure that the fields are not empty when the user submits the form. If the required fields are empty, the form does not submit and the focus is set to that text field. Setting the focus is a nice feature because the user is directed to the exact field that produced the error. You can do more with this script by making sure the form does not contain certain words, email address validation, and so on. For this demonstration I am only showing the basic script. Feel free to modify and utilize this script in any way you see fit. If you have any questions, contact me.
©2019 A--9.com