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
188
Chapter 3
s
e
n
d
(
)
o
p
e
n
(
)
s
e
t
R
e
q
u
e
s
t
H
e
a
d
e
r
s
(
)
Request Object
2
s
e
n
d
(
)
o
p
e
n
(
)
s
e
t
R
e
q
u
e
s
t
H
e
a
d
e
r
s
(
)
Request Object
1
We need two request objects!
It looks like with just one request object, we can’t keep up with more than
one order at a time. Let’s see if we can x the problems we’re running into
by using two different request objects:
using multiple request objects
JavaScript
PHP script
HTML form
Time to dig back into
your JavaScript again.
s
e
n
d
(
)
o
p
e
n
(
)
s
e
t
R
e
q
u
e
s
t
H
e
a
d
e
r
s
(
)
Request Object
coffeemaker.php
1
s
e
n
d
(
)
o
p
e
n
(
)
s
e
t
R
e
q
u
e
s
t
H
e
a
d
e
r
s
(
)
Request Object
coffeemaker.php
2
When Bob places his order,
you need to use the second
coffee maker...
When Jim places his
order and your code
sends a reuest to use the
rst coffee maker...
...you should use your
rst request object...
we’ll call this request1.
...and the second request
object. Let’s call this
request object request2.
Now you can keep up with both coffee orders.
Bob’s order
Jim’s order
This request object will only
worry about orders made using
the rst coffee maker.
This request object takes care
of all orders made using the
second coffee maker.
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