Q: Am I supposed to understand all of this?
A: No, you’re not. For now, just try to get a general idea of how
all this looks and the way the pieces fit together. Focus on the big
picture, and then we’ll start to fill in the gaps in later chapters.
Q: So what’s an XMLHttpRequest?
A:XMLHttpRequest is what most browsers call the
request object that you can send to the server and get responses
from without reloading an entire page.
Q: Well, if that’s an XMLHttpRequest, what’s an
A: An ActiveXObject is a Microsoft-specific
programming object. There are two different versions, and
different browsers support each. That’s why there are two
different code blocks, each trying to create a different version of
Q: And the request object is called XMLHTTP in a Microsoft
A: That’s the type of the object, but you can call your variable
anything you’d like; we’ve been using request. Once you
have the createRequest() function working, you
never have to worry about these different types again. Just call
createRequest(), and then assign the returned value to
Q: So my users don’t need to be using a specific browser?
your users can be running any browser they want.
support back on if they wanted to use your Ajax app.