Chapter 15: Introducing Ajax

Return to Chapter 15

 

To use this script on your own page, click in the text area below, select all, and copy to grab the script. Then, just paste into your own page — and you're done.

Reading Server Data

See it run: Reading Server Data

Script 15.1

This is the HTML for the text and XML file request example.

Script 15.2

This JavaScript retrieves the data from the server.

Script 15.3

This is the example XML file that is requested by Script 15.2.

Script 15.4

This is the example text file that is requested by Script 15.2.