Google


ADBRITE ads links
You are here: CodeIdol.com > Ajax > Head Rush Ajax > She Blinded Me With Asynchronous > What Do We Do With The Servers Response

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

3.21. What do we do with the server's response?

You've completed orderCoffee(), and now coffeemaker.php is done. When you send a request to brew coffee to one of the coffee makers, coffeemaker.php runs and then returns the coffee maker that completed the order, as well as the name of the person who placed the order.

Jim enters his coffee order, and clicks "Order Coffee".
    orderCoffee()


    coffee.js

    Make Jim a large mocha using the first coffee maker

    coffeemaker.php

    1Jim
The server returns the coffee maker that finished brewing, and then the name of the
person who placed the order.

    orderCoffee()

    serveDrink()
When the browser gets a response from the server, it will run the callback you
indicated: serveDrink().
coffee.js
serveDrink() needs to let the person
who placed the order know their coffee is ready, and set the status of
the right coffee maker back to "Idle".


SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

You are here: CodeIdol.com > Ajax > Head Rush Ajax > She Blinded Me With Asynchronous > What Do We Do With The Servers Response
   
Related tags







Popular Categories
Unix books and guides
AJAX popular information
C# language guides
Windows books and cookbooks
.......






© CodeIdol Labs, 2007