Without using program code, it’s a good idea at this point to summarize the contents of this chapter by looking at the process of combining all three technologies into an everyday Ajax feature that many websites use: checking whether a desired username already exists on the site when a user is signing up for a new account. A good example of this can be seen with Google Mail (see Figure 1-3).
The steps involved in this Ajax process would be similar to the following:
The server outputs the HTML to create the web form, which asks for the necessary details, such as username, first name, last name, and email address.
Optionally, an improved version of this process could even look at the username requested by the user and suggest an alternative that is currently available.
All of this takes place quietly in the background and makes for a comfortable and seamless user experience. Without using Ajax, the entire form would have to be submitted to the server, which would then send back HTML, highlighting any mistakes. It would be a workable solution, but nowhere near as tidy or pleasurable as on-the-fly form field processing.
Ajax can be used for a lot more than simple input verification and processing, though; we’ll explore many additional things that you can do with it in the Ajax chapters later in this book.