Question: Front End ( HTML & JavaScript ) : 1 . Design a web page with the following components: A text input for users to enter
Front End HTML & JavaScript:
Design a web page with the following components:
A text input for users to enter the city or location.
A button to trigger fetching weather information.
Display areas for the temperature, weather description, and an icon representing the current weather.
Implement JavaScript functionality to:
Capture user input for the city or location.
Use AJAX or Fetch API to make a request to a PHP backend endpoint.
Update the UI with the fetched weather information.
Back End PHPNodeJs:
Create a PHPNodejs script to handle weather information retrieval.
Use a simple API eg OpenWeatherMap API to fetch current weather
data based on the user's input.
Set up an API endpoint for fetching weather information.
Parse the API response and return relevant weather data.
If you don't have any experience in backend you can implement the same logic using
client side javascript.
Additional Requirements:
Apply basic styling using CSS to make the weather application visually
appealing.
Display appropriate icons for different weather conditions.
Handle errors gracefully, such as displaying a message when the city is not
found.
Evaluation Criteria:
Code organization and structure.
Proper usage of HTML JavaScript, and PHP
Effective handling of asynchronous requests using AJAX or Fetch API.
Displaying fetched data in a clear and userfriendly manner.
Basic error handling for cases like invalid city names
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
