a message for the browser to display. For example:

preload.innerHTML = "initializing";

We then execute a series of if else statements based on the readystate of the xmlhttprequest object and change the message accordingly.

Later in part 2 of this tutorial, we will make an uber cool preload widget, much like the flash ones you see around the Web. To do that we will use some header information and the readystates of the xmlhttprequest object. But for now, this will suffice. Lets look at the code for the ready states so you can conceptualize what is happening.

It is presented on the next page in order to keep the code relatively together.