O'Reilly logo

Ajax Starter Kit by Phil Ballard

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

9. Talking with the Server

In this lesson you’ll learn how to use the properties and methods of the XMLHTTPRequest object to allow the object to send requests to and receive data from the server.

Sending the Server Request

Lesson 8, “The XMLHTPPRequest Object,” discussed at some length the JavaScript XMLHTTPRequest object and how an instance of it may be created in various different browsers.

Now that we have our XMLHTTPRequest object, let’s consider how to create and send server requests, and what messages we might expect to receive back from the server.

We’re going to jump right in and first write some code using what you learned in Lesson 8 to create an XMLHTTPRequest object called myRequest. We’ll then write a JavaScript function called ...

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