3.11. Here's what we did...We put all the code that creates and tests the request object into common.js, and then put all the coffee-related functions into coffee.js. If you did things differently, that's okay. Just make sure you remember where each function is so you know which file to edit as you build the rest of the application. coffee.js ajax.js var request = false; try { ... } if (request == null) { ... } function sendRequest(url) {...} function serveDrink() {...} function orderCoffee() {...} function getSize() { ... } function getBeverage() {...} Welcome to iterative development... we're going back to finish up the HTML now, even though we've started on the JavaScript.
|