Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

Students also viewed these Databases questions