5.3. 1. Update the Break Neck HTMLFirst, we need to change Break Neck's HTML so that it no longer submits the form when a customer clicks "Order Pizza". Let's take a look at the Break Neck order form, and make a few changes: <body> <div > <p><img src="/books/2/850/1/html/2/breakneck-logo_new.gif" alt="Break Neck Pizza " /></p> <form method="POST" action="placeOrder.php">The <form> element no longers needs the "action" or "method" attributes. <p>Enter your phone number: <input type="text" size="14" name="phone" onChange="getCustomerInfo()" /> </p> <p>Type your order in here: <br /> <textarea name="order" rows="6" cols="50" > </textarea></p> <p>Your order will be delivered to: <br /> <textarea name="address" rows="4" cols="50" > </textarea></p> <p><input type="submit" value="Order Pizza" /></p>Here's the old version of the submit button. <p><input type="button" value="Order Pizza"This button can change from a "submit" type to a "button" type. onClick="submitOrder();" /></p>Instead of submitting the form, clicking "Order Pizza" should run the JavaScript function you'll be writing next. </div> <p >** No more waiting! Now faster than ever! ** </p> </form> </body> |