Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This page requires the user to select a meal main ingredient, selection of an ingredient triggers and API call to fetch a list of associated

This page requires the user to select a meal main ingredient, selection of an ingredient triggers and API call to fetch a list of associated meals. Selection of a meal triggers an API call that fetches meal details. Display the meal details (meal name, ingredients and measurements, recipe details, a meal images (use the CSS fade in animation to load the image), and an embedded YouTube video.
Each select menu should contain a first option named -Select One- that is selected by default. If this item is selected after data has been loaded in the page, then downstream page elements should be removed from the DOM and rebuilt once a valid selection is made.
Example: If a user selects a new ingredient from the first select menu, all the other menus and content areas (recipe, ingredient list, images, etc.) should be removed from the DOM.
If a user selects a new meal from the dropdown list, all the other content areas (recipe, ingredient list, images, etc.) should be removed from the DOM.
Web Services Used
Well be using the free web API provided ( httpProcess Steps
Step 1
Start with an empty HTML file
1. When the web page loads, make a call to thThis will return a list of all of the ingredients available in the database. Each ingredient in the returned dataset will have the following properties:
a. idIngredient the unique ID of the ingredient
b. strIngredient the name of the ingredient
c. strDescription a description of the ingredient
example:{"idIngredient":"41","strIngredient":"Butter",
"strDescription":null,"strType":null}e http:///......)2. Extract the strIngredient values from the API JSON data and save as a list
3.Sort the list of ingredients
4. Use the sorted list of ingredients to dynamically create an HTML select element containing all the strIngredient as values and options. This list will be long, so turn on select autocomplete so you can perform typeahead lookups on ingredient names. Example: chicken breast

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

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

Students also viewed these Databases questions

Question

How can we decide what is ethical and what is not in psychology?

Answered: 1 week ago