124
Chapter 2
60 Second Review
ß For Microsoft browsers, the Ajax request
object is ActiveXObject, using either
Msxml2.XMLHTTP or Microsoft.XMLHTTP
as the type of the object.
ß For non-Microsoft browsers, including
FireFox, Safari, and Opera, the Ajax request
object is XMLHttpRequest.
ß Static JavaScript is JavaScript that is not in
a function, and is run by the browser when it
loads your page.
ß You can use static JavaScript to make sure
certain pieces of code run before users start
working with your web page.
ß A request’s ready state indicates what
is happening with the request: whether
it’s being initialized, the server has been
contacted, the server is finished, etc.
ß When the ready state of a request is “4”, the
server has finished processing the request,
and any response data is safe to use.
ß Every time a request’s ready state changes,
the callback function registered with the
request is run by the web browser.
ß You need to use the DOM to update the text
in HTML display elements like <div> and
<span>; you can use the value property
to set the text of form field elements like
<input> and <textarea>.
ß Make sure the ordering of your fields works
with your application’s JavaScript, and not
against it, to help avoid confusing your users.
ß You need to use a different request URL
for each request to work around caching
browsers like Opera and Internet Explorer.
I think it’s ...