September 2002
Intermediate to advanced
544 pages
13h 6m
English
Although this book is about CGI programming, I want to talk a bit about JavaScript—the first line of defense for validating user input. The most important thing to remember about using JavaScript to validate forms is that it’s not completely reliable. In other words, you must validate the form content on the server side as well.
There are two advantages to using JavaScript to validate forms. One works to the benefit of the user, and the other works to the benefit of the systems administrator. Users benefit because JavaScript provides instant feedback. You can set up your form validation so that it tests the value in a form field the moment the user leaves that field, or before the form is submitted. Either ...
Read now
Unlock full access