O'Reilly logo

Ajax Patterns and Best Practices by Christian Gross

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. The Nuts and Bolts of Ajax

Ajax is simple and could be described as an 11-line piece of code. So, doing some mental math, describing Ajax and the XMLHttpRequest type[9] should take no more than four or five pages. Yet this chapter is more than four or five pages—in fact, quite a bit more. The reason is that knowing how to use the XMLHttpRequest type does not equate to making the best use of XMLHttpRequest.

The first purpose of this chapter is to introduce and explain a simple Ajax example. The second purpose is to explain a meaningful development strategy using the XMLHttpRequest type.

Ajax for the Impatient

The Ajax example illustrated in this chapter is an HTML page that has a single button. Clicking the single button makes an HTTP request ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required