Skip to Main Content
Head Rush Ajax
book

Head Rush Ajax

by Brett McLaughlin
March 2006
Beginner to intermediate content levelBeginner to intermediate
448 pages
13h 33m
English
O'Reilly Media, Inc.
Content preview from Head Rush Ajax
72
Chapter 2
Diagramming the Break Neck app
Now that you know how customers will use the Break Neck app, let’s take
a look at what actually has to happen behind the scenes.
Man, Break Neck pizza rocks. There’s
nothing like a breakfast of cold pizza, a
whipped latte from Starbuzz, and the
Webville Times to read.
<script>
var request...
function foo()
{
...
}
</script>
JavaScript
Once the customer enters their phone
number, a JavaScript function is called.
<script>
var request...
function foo()
{
...
}
</script>
When the customer clicks “Order
Pizza”, his order and information
are sent to the Break Neck server.
Customer’s Phone Number
Customer’s Address
Customer’s Order
The server places the
order and creates a
delivery request..
The delivery request has
the customer’s order and
correct address on it.
The server looks up the
customer’s address and
returns it to the browser,
without any HTML.
While the server is looking up the
customer’s address, the customer
types in his pizza order.
The browser calls a
JavaScript function, which
then updates the web page
with the customer’s address.
The JavaScript sends the customer’s
phone number to the server, and asks
for that customer’s address.
break neck planning
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

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
Head First Ajax

Head First Ajax

Rebecca M. Riordan

Publisher Resources

ISBN: 0596102259Errata PageSupplemental Content