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
95
ajax requests
Break Neck’s PHP script
Let’s ask Frank over in the server-side group to write us a PHP script to
look up customer addresses. Then you can send the customer’s phone
number to this script, and get the customer’s address as a response.
Team Chat: Talking to the Server
Team Chat: Talking to the Server
Hey, Frank, you’re good with PHP, right?
Team Chat: Getting Some PHP Help
Team Chat: Getting Some PHP Help
Yeah, sure. What do you need?
I’ve got a customer’s phone number from an order
form.You think you could write a script that gives me
that customer’s address based on their number?
In the book’s examples, look in the chapter02/breakneck directory,
and nd the lookupCustomer.php script. This is a PHP script that will
run without a database server; keep this le on your computer, or
FTP it to your web site—you’ll be using it in just a sec.
...then I can use JavaScript to update my HTML on the y.
Jim
Frank
Jim
No, I’m making an asynchronous request, so I won’t
need anything but the raw data...
Jim
Sure, just send over the phone number as a request
parameter. You want me to return their information
as part of a new HTML page?
Frank
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