Prev | Current Page 220 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"


method="post">
The class two_col_form associates the form with the CSS that styles
it. The other two attributes of this form, action and method, are
always required. action determines which page on the server holds
the code that will process the form. (Often that processing code is
end select
input must be wrapped in a block
level element to validate
submit button
Displaying a list of errors at the top
of a form, after it is submitted and
re-displayed to the user for corrections,
is a common but rather basic
way to handle errors. In many sites
today, real-time validation using ???nopage-
refresh??? Ajax techniques (if you
don??™t know what Ajax is, see Jesse
James Garrett??™s famous article which
de?¬? ned the Ajax term at http://www.
adaptivepath.com/publications/
essays/archives/000385.php)
enables any errors to be displayed
right by the form ?¬? elds as soon as
the user ?¬? nishes typing text into
them. These kinds of interactions,
while user-friendly, are somewhat
complex to implement. I??™ll just illustrate
the tried and tested methods
of displaying errors at the top of
the form and encourage you, for an
example, to look at how the applications
produced by 37signals.com do
a great job of real-time Ajax-based
form validation.
STYLIN??™ WITH CSS - CHAPTER 6 194
placed in the same page of form itself, which, just like CSS, can be
embedded in the head of a page.


Pages:
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232