Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Javascript - For this assignment we will be creating a Restaurant Order Form. I have created the basic page, along with some sample code to

Javascript - For this assignment we will be creating a Restaurant Order Form. I have created the basic page, along with some sample code to get you started.

You will need to complete the functions to Toggle the Fries and Drinks sections by adding or removing the 'hide' CSS class I created. I have already created the function to Toggle Burgers and you can use that as an example to build out the full functionality. I have also made created the function to reset the form.

Finally, to calculate the total, you will need to get the value of each checked checkbox and add to a variable that you can display at the end. You can do that the same way we have gotten values from input boxes in past assignments. See the below line for an example.

document.getElementById('burger_1').value

HINT: When you calculate the total, you should consider that a user could uncheck an categories checkbox without unchecking the items within, i.e. They may uncheck Burgers without unchecking Cheeseburger. We should assume that if the main category is unchecked, they do not want an item within it. What that means for you, is that you should use a nested IF statement to first check if a category is checked at all, and then if so, add any checked items under it to your total.

Week 12 & 13 Programming Assignment

Restaurant Menu

Burgers
$3.99 Hamburger
$4.49 Cheeseburger
$5.99 Bacon Cheeseburger
Fries
$1.99 Small Fries
$2.99 Large Fries
$4.99 Chilli Cheese Fries
Drinks
$0.99 Water
$1.99 Small Fountain Drink
$2.99 Large Fountain Drink
Total:

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

What is American Polity and Governance ?

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago