Skip to Main Content
Universal Design for Web Applications
book

Universal Design for Web Applications

by Wendy Chisholm, Matt May
November 2008
Beginner content levelBeginner
198 pages
5h 15m
English
O'Reilly Media, Inc.
Content preview from Universal Design for Web Applications

Error Handling

Perhaps the most important feature of forms is one that’s completely unspecified in HTML: validation.

It used to be that all problems were handled on the server. HTML and HTTP were just the go-between and didn’t interfere with anything except, for example, the maximum length of a given text field.

Forms are funny things, and people are even funnier. The longer and more complex a form gets, the more likely that something is going to be wrong with what is submitted. It’s missing a required field. A zip code field has too few digits or isn’t relevant (for the 95% of people who don’t have mailing addresses in the U.S.). Or maybe the perfectly valid credit card is perfectly out of credit.

JavaScript has made itself invaluable when it comes to most error conditions; so much so, in fact, that we consider client-side form validation more or less mandatory. What used to be a reasonable delay—the round-trip to the server to find out the results of your form—is now a real inconvenience, especially when your problem could have been fixed immediately.

Communicating error and warning conditions to users is not a standard process—but it is something that you will need to do frequently enough that you should have a plan. Here, too, we need to make sure that the plan includes the most inclusive ways of notifying users of their errors.

Client Side

The first step you should take with your forms validation is to determine what could possibly break. Here are some of the obvious potential failures: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Designing the Obvious: A Common Sense Approach to Web and Mobile Application Design, Second Edition

Designing the Obvious: A Common Sense Approach to Web and Mobile Application Design, Second Edition

Jr. Robert Hoekman
Designing Great Web APIs

Designing Great Web APIs

James Higginbotham
Designing Evolvable Web APIs with ASP.NET

Designing Evolvable Web APIs with ASP.NET

Glenn Block, Pablo Cibraro, Pedro Felix, Howard Dierking, Darrel Miller

Publisher Resources

ISBN: 9780596155681Supplemental ContentErrata