Section 2.28. Step 3: Retrieve the customer s address


2.28. Step 3: Retrieve the customer's address

In this step, we need to use the address that the Break Neck PHP script will return in response to the request we made in Step 2. Then, we can have the browser run a JavaScript function once it has a response from the Break Neck server, and pass along the address from the script.

 On to the next step in coding Break Neck.     Web ServerThe Break Neck PHP script looks up the customer by his phone number, and returns his address.     Remember, it's the browser that gets the response from the server. Then, it "calls back" the JavaScript function you specified in your request object.Customer's Address Here's where the browser runs your callback function.We'll need to write this JavaScript function. It can get the server's response from the request object you created back in Step 2. 

The browser runs your callback function every time the ready state of your request object changes.




Head Rush Ajax
Head Rush Ajax (Head First)
ISBN: 0596102259
EAN: 2147483647
Year: 2004
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net