Until now, all of the recipes in this chapter have concentrated on input validation and providing appropriate feedback to the user. There are situations where it is better to simply prevent the user from inputting invalid characters in the first place. This method would not typically be used, because it can be confusing for some users; for example, if they are not being told why they cannot input %. A situation where this would work is a login form. If you know your registration system does not allow % in the username, you know that the user would be inputting % by mistake, and therefore preventing the input is acceptable. This recipe provides a method to prevent users from inputting non-alphanumeric characters into an input field.
jQuery 2.0 Development Cookbook
By :
jQuery 2.0 Development Cookbook
By:
Overview of this book
Table of Contents (17 chapters)
jQuery 2.0 Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Document Object Model Manipulation
Interacting with the User by Making Use of jQuery Events
Loading and Manipulating Dynamic Content with AJAX and JSON
Adding Attractive Visuals with jQuery Effects
Form Handling
User Interface
User Interface Animation
Understanding Plugin Development
jQuery UI
Working with jQuery Mobile
Index
Customer Reviews