Chapter 3. Getting to Know Ajax

<feature><title>In This Chapter</title> <objective>

Developing an Ajax application

</objective>
<objective>

Getting XML from the server

</objective>
<objective>

Working with the XMLHttpRequest object

</objective>
<objective>

Passing data to the server by using Ajax

</objective>
<objective>

Getting data from the server with the GET method

</objective>
<objective>

Getting data from the server with the POST method

</objective>
</feature>

“Look at that!” the CEO hollers. “No wonder users don’t like making purchases on our site. The page is always flickering.”

“That’s because you’re refreshing the page each time you get more data,” you say calmly, coming out of the shadows.

“Who are you?” the CEO cries.

“A master Ajax programmer,” you reply. “And my rates are quite reasonable. For a major corporation, anyway.”

“Can you solve that perpetual flickering?” asks the CEO.

“Certainly,” you say, “for a hefty price.”

“Anything!” the design team says.

You sit down at the computer and calmly take over. This, you think, is going to be good. And the money’s not half bad either. All it’s going to take is a little Ajax in the right places, and the problem is as good as solved.

This chapter is where you start coding some Ajax. You’re going to start working with the XMLHttpRequest object in depth here and in the next chapter. This chapter gives you a working knowledge of Ajax — from the very beginnings all the way up to sending and receiving data to and from the server.

Writing Some Ajax

To ...

Get Ajax For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.