Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello. I need help with a javascript problem. I am supposed to Create and debug a JavaScript file that processes the Low and High Temperatures

Hello. I need help with a javascript problem. I am supposed to Create and debug a JavaScript file that processes the Low and High Temperatures from the temps.html file that meets the followings:

----An if statement must be used to ensure that the user enters both low and high temperatures for any given day before the form is submitted. If the user does not enter one or both of the temperatures, a message or messages must be displayed to tell the user that valid low and high temperatures must be entered. The form will not be processed unless both temperatures are entered.

---- The low and high temperature values entered from the html form must be processed into an array or arrays with loops as needed in the temps.js file to calculate and display the results in an HTML table as shown that becomes the output to the temps.html file. Further detail on each part of processing the array and resulting HTML table appear in Items d through j below:

----The table must display a header row of Date, Low Temperatures, High Temperatures.

----The first row of the table must display a row that contains the current date and the first pair of temperatures entered.

----Each additional row follows the pattern of displaying a date which is one day older than the previous date and the most recent pair of temperatures entered.

----The date must be displayed in the format shown. h. The average low temperature for all low temperatures entered must be calculated.

----The average high temperature for all high temperatures entered must be calculated.

----A summary row must display Averages as shown followed by the average low temperature and average high temperature.

The problem I have is with the submit button. When I click it, it just sort of refreshes the page and deletes the information I entered instead of giving me the average of the temperatures.

Thank you.

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Find the dimension of the subspace of C4. a + b a+da, b, c, d E C

Answered: 1 week ago

Question

Describe several ways to identify high-potential employees.

Answered: 1 week ago