Book Image

jQuery for Designers Beginner's Guide Second Edition

By : Natalie Maclees
Book Image

jQuery for Designers Beginner's Guide Second Edition

By: Natalie Maclees

Overview of this book

Table of Contents (21 chapters)
jQuery for Designers Beginner's Guide Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Validating site visitor entry


Sometimes, it can feel frustrating for a site visitor when they have to submit a form several times over, correcting errors that they've made while filling it out. Without JavaScript, the only way to validate the information that the site visitor has entered is to wait for them to submit the form, then identify the issues on the server, and send back a page that contains the form along with any error messages that might help the site visitor correct the problem.

Showing errors as soon as they occur goes a long way towards making your form feel snappy and responsive and helping your site visitors submit the form correctly on the first try. In this section, we'll learn how to use the Validation plugin from Jörn Zaefferer. This plugin is powerful and flexible and can handle validation in several different ways. We'll take a look at the most straightforward way of adding client-side validation to your form.