3.37. Change that baby back to asynchronous!Don't forget to change sendRequest(), in coffee.js, back to the asynchronous version... nobody wants to wait around on their caffeine fix. Two coffee makers, asynchrony, and one jittery, wired, happy office. Check out the coffee maker for yourself! 60 Second Review
Webville Tree Farm 5 miles ahead We're headed to the tree farm in Chapter 4... get ready for some Web Forestry. 3.37.1. Just Do It SolutionNow that you know the name of your JavaScript functions, you can finish up the rest of the HTML for the coffee maker. <h3>Beverage</h3> <p> <input type="radio" name="beverage" value="mocha" checked="true">Mocha</input> <input type="radio" name="beverage" value="latte">Latte</input> <input type="radio" name="beverage" value="cappucino">Cappucino</input> </p> <p> <input type="button" onClick="orderCoffee();"orderCoffee() is the JavaScript function you'll write to send a new coffee order to thecoffee-making PHP script. value="Order Coffee" /> </p> </form> </div> </div> In the first coffee maker, these ids were "coffeemaker1" and "coffeemaker1-status"... <div > <h2>Coffee Maker #2</h2> <p><img src="/books/2/850/1/html/2/images/CoffeeMaker2.gif" alt="Coffee Maker #2" /></p> <div >Idle</div>...so in this coffee maker, we just changed all the "1"s to "2"s. </div> |