Question: Use javascripts in modifying the html page Meal planner Meal planner Dietary restriction: None Vegetarian Low Carb Food Items: Plain Rice Baked Potato Toasted Bread

 Use javascripts in modifying the html page Meal planner Meal plannerDietary restriction: None Vegetarian Low Carb Food Items: Plain Rice Baked PotatoToasted Bread Grilled Chicken Braised Pork Roast Beef Slow-cooked beans Poached turnipsGlazed carrots Roasted Broccoli Steamed Beans A meal planner HTML file has

Use javascripts in modifying the html page

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 beans
Poached turnips
Glazed carrots
Roasted Broccoli
Steamed Beans


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. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!