Datasheet

Log in with Ajax
Here’s another good one: rather than asking the users to navigate through a couple of pages to log
in to a site, you can use Ajax to make the process easier, checking their typed username and pass-
word behind the scenes.
For example, take a look at
www.jamesdam.com/ajax_login/login.html, which is shown
in Figure 1.15. This page lets you log in automatically using Ajax, no page refresh required.
FIGURE 1.15
An Ajax-enabled login page
If you enter an incorrect username and password, such as Steve and opensesame and click the page
anywhere, you’ll see an error message, as shown in Figure 1.16.
15
Essential Ajax
1
06_102633 ch01.qxp 2/23/07 9:44 PM Page 15