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
you’re on your way 4
75
ajax requests
HTML 101: accepting user input
The Break Neck order form already has elds for the customer to
enter in their phone number, address, and pizza order. Let’s take
a quick look at the HTML for the order form, and then gure out
how to connect this HTML to the JavaScript you’ll be writing:
<html>
<head>
<title>Break Neck Pizza Delivery</title>
<link rel=”stylesheet” type=”text/css” href=”breakneck.css” />
</head>
<body>
<p>
<img src=”breakneck-logo.gif”
alt=”Break Neck Pizza” />
</p>
<form method=”POST” action=”placeOrder.php”>
<p>Enter your phone number:
<input type=”text” size=”14” name=”phone” />
</p>
<p>Your order will be delivered to:</p>
<p><textarea name=”address” rows=”4” cols=”50”>
</textarea></p>
<p>Type your order in here:</p>
<p><textarea name=”order” rows=”6” cols=”50”></textarea></p>
<p><input type=”submit” value=”Order Pizza” /></p>
</form>
</body>
</html>
You’ll ll this in with
the address that the
server returns, but
let’s leave it as a
eld so a customer
can enter a different
address if the want.
Here’s where
the customer
enters his
phone number.
A normal “submit” button
is used for placing the
order, using a form POST.
This is the URL for
placing the pizza
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