Section 3.28. The final test drive (right?)


3.28. The final test drive (right?)

It looks like we've got all the JavaScript for the coffee maker app written. Be sure you've followed along with all the examples so far, and saved your changes to coffee.html and coffee.js. Then load coffee.html in your browser, and take the coffee maker for a test drive.

  1. Enter an order for Jim: he wants a large mocha. Then click "Order Coffee".

  2. Jim's order starts brewing, using the first coffee maker.

  3. Now enter another order, for Bob. Bob wants a medium latte. Click "Order Coffee", and Bob's order should start brewing on the second coffee maker.

  4. Now wait for the coffee makers to finish brewing. Whose order comes up first? Do both orders finish brewing? Is this what you expected to happen?

    Bob's order comes up first, even though it was ordered second.

So what happened to Jim's coffee order?




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