A McGraw Hill Book Plug-in JavaScript: 100 Power Solutions
By Robin Nixon (McGraw Hill 2010, ISBN 978-0071738613)

Home | About | Buy It | Download Plug-ins

Chapter: 1  2  3  4  5  6  7  8  9 10 11 12 13

Chapter 12: Forms & Validation

While form validation is something you must do on your web server to ensure that you receive the data that is required, and to remove any attempts at hacking or compromising your server or the data on it, it is still very helpful to your users to also provide validation directly in the browser. For example, it can be particularly helpful to provide extra assistance when a user is filling in a form to save it from having to be represented to them if it fails validation at the server. It also cuts down on your bandwidth usage and keeps the number of concurrent users the server can manage at the optimum. So this chapter includes plug-ins to provide extra hints for blank form fields that must be fill out, to provide the ability to resize text area inputs if a user types more than the expected amount of text, to check that email addresses and passwords are valid, to clean up user input strings and to check that credit card number checksums validate.

Example: 90 91 92 93 94 95