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
42
Chapter 1
Since the browser handles sending requests, it’s also responsible for getting responses
back from the server. Let’s see what the browser is doing in the Boards app:
The browser gives the server’s response to your JavaScript
1
The browser displays the Boards app to Katie
2
The browser runs the getBoardsSold() function
3
The browser runs the createRequest() function
<html>
.
.
.
</html>
boards.html
h1, h2 {
fon
col
}
p {
boards.css
Web Browser
Internet Explorer
Firefox
Opera
Safari
Mozilla
Here’s what Katie sees.
Here’s
what you
provide
to the
web server.
The browser retrieves the HTML
and CSS from the web server...
Web Browser
Internet Explorer
Firefox
Opera
Safari
Mozilla
Katie
clicks this
button...
...and the browser sees that
onClick is attached to the
getBoardsSold() function.
Web Browser
Internet Explorer
Firefox
Opera
Safari
Mozilla
getBoardsSold()
createRequest()
getBoardsSold()
It’s actually the web
browser that is “running” all
your JavaScript code.
createRequest() counts
on the browser to help it
create a request object.
JavaScript
...and turns them into this.
The getBoardsSold()
function calls the
createRequest() function.
web browsers have a lot to say
you’re on your way 4
43
next generation applications
Web Browser
Internet Explorer
Firefox
Opera
Safari
Mozilla
4
The browser sends a request to Katie’s web serv
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