Question: Create a new HTML file called pizzaorder.html. Copy and paste the HTML form from the following Link http://codepen.io/drmisbha/pen/qOKKLy Inside the HTML file, write the JavaScript
Create a new HTML file called pizzaorder.html. Copy and paste the HTML form from the following Link http://codepen.io/drmisbha/pen/qOKKLy Inside the HTML file, write the JavaScript function to calculate the Total Price and display it inside the textarea with name output. (Remember to update the onclick attribute in the button with the name of the function) The output message should be Your total order is SAR ___________ and it will be delivered to you at ________________. The price is calculated based on the below formula Total = Size_Price + (Total of Toppings) + (Delivery Type) The values of each price is included as value property of the input tags in HTML. The checkbox for toppings is an array (they have the same name). Hint: Use loops to go through the array of toppings and check if they are checked or not and then add to the price. Form Validation If the user does not select the size, write the error message inside the textarea Select the Price. If the user does not select the delivery type, write the error message inside the textarea Select one of the Delivery Types If both price and delivery type is not selected, both error messages should be displayed one after the other.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
