you’re on your way 4
121
ajax requests
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
<script>
var request...
function foo()
{
...
}
</script>
Customer’s Phone Number
Customer’s Address
Customer’s Order
Step 5: Place the customer’s pizza order
The customer enters their order into the form, and they’ll see their
address lled in, Ajax style, by the JavaScript function you wrote in Step 4.
All that’s left is to let the user submit his order, and get the pizza cooking.
Customer’s Order
Ajax? No, I have no idea what
that is. But if it’s what got my
pizza here so fast, I’m all for it.
While the server
is looking up the
address, the
customer types in
his pizza order.
With an order and
delivery address,
the customer can
click “Order Pizza”.
The server generates a
delivery order for Alex, and
gets the pizza cooking.
The customer now gets his
order fast, because Alex
knew the right address to
deliver the pizza to.