| Logged In As: Web Spider ( Log In - Register - Reset Password ) | |
Chapter Techniques
Chapter 7 - Form HandlingThis chapter is a first real take at using forms and validating form data. It's pretty generic, with more in the coming chapters. The Majority of what was covered has been added to the registration and contact pages. What's on this page is just a little something I put together for fun. Calculate Form OneCalculate Form TwoThe Javascript I used on this page, as well as in other sections of the site for form validation, isn't quite the same as what was in the book. The script in the book (for this chapter at least) used in form validation is very generic. The point of it is that with only a few minor adjustments to the HTML, it could be used for just about any form. And while that sounds good in theory, I personally like to have a little more control over my scripts. There are times where I want to look for something a little more specific than a general "is it empty" kind of thing. Plus, the way the script works in the book, as soon as it finds the first error, it highlights that one error and then stops. I personally like validation scripts to find and highlight ALL errors in a form so that the user only has to submit once to see where all the problems are. But, this chapter was just a first step in form validation, and the script could probably be modified to at least find and highlight all generic errors. |
|
| Home - Contact - Advertise Here | |
|
[ Executed in 0.0107 seconds ] - [ DB Queries: 9 ] Copyright © 2008 - 2010 Robert Lauer/Distant Words - Live since November 9, 2008 Distant Web - Programming & Scripting |
|
Active Users:
Currently there are 0 Member(s), 0 Guest(s) and 1 Bot(s) crawling this site.
|
|