HTML and CSS Reference
In-Depth Information
Browsers can also check the input data on the client side and refuse to accept it or submit the form if it's
incomplete or incorrect. Figure 7.2 shows Opera refusing to accept a value that's outside the specified range.
Figure 7.2. Opera 9 won't allow the user to submit a value outside a specified range for a numeric
typed field.
[View full size image]
Potential Trade-offs
Not all browsers support these types yet. In fact, so far only Opera 9 does. More support is coming soon, but in
the meantime, these forms still work perfectly well in today's legacy browsers. Users just don't get all the neat
new features to help them with data entry.
Input validation helps users be sure they don't make a mistake. However, it does not substitute for server-side
validation. Not all clients check these inputs, and hackers can trivially submit values outside the expected
ranges.
The resultant pages will not be valid when compared against the traditional HTML and XHTML DTDs. However,
this will have no effect on browser display.
It's an open question whether these documents will ever be valid. There's some sentiment for not even
bothering with schemas or DTDs for future versions of HTML. However, I expect that DTDs and schemas will
eventually be published.
Mechanics
You can easily do a multifile search for <form just to find the pages that would benefit from closer inspection.
Once you've found a form, consider it field by field to figure out what types are likely to be a good fit. There's
not a lot you can do to automate this process.
Search WWH ::




Custom Search