Skip to Content
Head Rush Ajax
book

Head Rush Ajax

by Brett McLaughlin
March 2006
Beginner to intermediate
448 pages
13h 33m
English
O'Reilly Media, Inc.
Content preview from Head Rush Ajax
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally

Publisher Resources

ISBN: 0596102259Errata PageSupplemental Content