110
Chapter 2
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 4: Update the order form
Once you’ve got the customer’s address, you need to update
the pizza order form. You’ll need the browser again, as well
as some help from the Document Object Model.
<script>
var request...
function foo()
{
...
}
</script>
Your JavaScript callback function
can use the browser and the
Document Object Model to
update the order form.
You’ve already gotten
the customer’s address in
Steps 2 and 3...
...and can use the DOM to update the
web form, similar to how you got the
customer’s phone number earlier.
If you make
a change to
a web page
using the
Document
Object
Model, the
browser
updates the
web page
immediately.
We’re getting close to
being done with the
Break Neck app!
revisiting the document object model