Section 3.14. Getting the beverage and size of the order


3.14. Getting the beverage and size of the order

Before we figure out how to get and update the status of the two coffee makers, you need to write the code for getSize() and getBeverage().

Let's look back at the coffee order form and see what we're dealing with:

 <form>Here's coffee.html. <p>Name: <input type="text" name="name"                  /></p> <h3>Size</h3> <p> <input type="radio" name="size"                 value="small"                 checked="true">Small</input> &nbsp;&nbsp; <input type="radio" name="size"                 value="medium">Medium</input> &nbsp;&nbsp; <input type="radio" name="size"                 value="large">Large</input>Here are the three size choices.</p> <h3>Beverage</h3> <p> <input type="radio" name="beverage"                 value="mocha" checked="true">Mocha</input> &nbsp;&nbsp; <input type="radio" name="beverage"                 value="latte">Latte</input> &nbsp;&nbsp; <input type="radio" name="beverage"                 value="cappucino">Cappucino</input> </p> <p> These three <input>s are the three options for the beverage. 

But how do we find out what size and beverage Jim selected?




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