Question: JAVASCRIPT ASSIGNMENT Purpose of the assignment To apply simple JavaScript concepts to create a Fahrenheit to Celsius conversion program. Whats required of you. Having looked

JAVASCRIPT ASSIGNMENT

Purpose of the assignment

To apply simple JavaScript concepts to create a Fahrenheit to Celsius conversion program.

Whats required of you.

Having looked at some basic examples of JavaScript on http://www.w3schools.com and at the simple math with forms and validation example in detail which appears below this assignment. I would like you to now apply those concepts to create a simple page that lets users type in some temperature value in the Fahrenheit scale and when the user clicks a Show results button, to show the temperature in Celsius scale. For example, if the user types in 32, your results should show 0 degree Celsius.

Functionality

At the least, your program should allow for the following

User Input: One text field where the user will type in the temperature in Fahrenheit

Input Validation: When the Show results button is clicked, your program should check to see if the user has left the text field empty and also if what the user typed is a number and not anything else.

If there are problems (as in II. above) then your program should show appropriate error messages

Display results: If there are no errors and user input is valid, then your program should show the results to the user.

Note: The temperature conversion function is C = (F-32)*(5/9)

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!