Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Meal planner Meal planner Dietary restriction: None Vegetarian Low Carb Food Items: Plain Rice Baked Potato Toasted Bread Grilled Chicken Braised Pork Roast Beef Slow-cooked
A meal planner HTML file has been provided. Add the following functionality: Pre-submission validation: If "Vegetarian" is selected under "Dietary restriction", disable the meat choices Selecting 1 Dietary restriction option is required At least 2 food items should be selected Post submission alert messages: Alert the user if "Low Carb" and more than 2 carbohydrate options are selected If less than 2 veggie options are selected (regardless of dietary restriction), alert the user that 2 veggies are recommended for a healthy meal Total caloric value of the meal A message telling the user they're eating too much if total is more than 750 calories A message telling the user they're eating too little if total is less than 400 calories Using the following caloric values: . (204) Plain Rice (194) Baked Potato (140) Toasted Bread (147) Grilled Chicken (260) Braised Pork (282) Roast Beef (124) Slow-cooked beans (135) Poached turnips (150) Glazed carrots (90) Roasted Broccoli (70) Steamed Beans Additional Guidelines: You may edit the HTML file to add things like ids, names, etc. Do not add additional form items, or change the input types. Use alerts to show validation messages and the output. You can use e.preventDefault() to prevent the page from reloading after submitting the form. Samples: Meal planner Dietary restriction: None O Vegetarian O Low Carb Food Items: Plain Rice Baked Potato Toasted Bread Grilled Chicken Braised Pork Roast Beef Slow-cooked beans Poached turnips Glazed carrots Roasted Broccoli Steamed Beans file:// Submit Query Total calories: 561 OK No errors Meal planner Dietary restriction: O None O Vegetarian O Low Carb Food Items: Plain Rice Baked Potato Toasted Bread Grilled Chicken Braised Pork Roast Beef Slow-cooked beans Poached turnips Glazed carrots Roasted Broccoli Steamed Beans file:// Submit Query Total calore: 1636 You shouldn't be eating this much OK Alert the user about too much food, and the total calories. Meal planner Dietary restriction: None O Vegetarian O Low Carb Food Items: Plain Rice Baked Potato Toasted Bread Grilled Chicken Braised Pork Roast Beef Slow-cooked beans Poached turnips Glazed carrots Roasted Broccoli Steamed Beans file:// Submit Query] At least 2 veggies is recommended for a healthy meal Total calories: 453 OK Note that the meat options here are grayed out because "Vegetarian" is selected. The other alert messages are still displayed
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started