I need help with this JavaScript code.  Create a basic form that fits the theme for your website. This can be a contact form or some form for ordering products. The form must contain the following elements: w3School Reference (Make sure you add your id's) Two fields to accept text Two radio buttons Three checkboxes that have some type of numerical value One combo box that contains 2 items Two buttons for Cancel and Submit Create a new JS file and name it validationForm.js, place the new js file into your scripts folder. Utilize the proper techniques to add the new js file to your Html code. JavaScipt: Use javascript to grab the information from the form, some fields can be optional but the user must enter a value in at least two text fields before pressing the submit button. (Hint: Event Listeners) Create a function to check if both text fields are not empty, the function should return a boolean value. If the value returned was false, present an alert with a proper message to enter the correct value in the field. Set the focus on the text box. Create a function that handles some type of mathematic problem and returns a value. If the user entered in all the required fields, console out any information that is relevant to what they selected to the console along with the answer to the math equation when they press the submit button. This will show that you know how to grab information from the form fields and present it in any future projects.   Feel free to create any extra variables necessary to accomplish your assignment. Make sure you leave comments. I like to use comments to describe what the line of code does below when it is executed. Reach out to your instructor if you have any questions.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

I need help with this JavaScript code. 

    • Create a basic form that fits the theme for your website. This can be a contact form or some form for ordering products.
      • The form must contain the following elements: w3School Reference (Make sure you add your id's)
        • Two fields to accept text
        • Two radio buttons
        • Three checkboxes that have some type of numerical value
        • One combo box that contains 2 items
        • Two buttons for Cancel and Submit
  • Create a new JS file and name it validationForm.js, place the new js file into your scripts folder. Utilize the proper techniques to add the new js file to your Html code.
  • JavaScipt:
    • Use javascript to grab the information from the form, some fields can be optional but the user must enter a value in at least two text fields before pressing the submit button. (Hint: Event Listeners)
    • Create a function to check if both text fields are not empty, the function should return a boolean value. If the value returned was false, present an alert with a proper message to enter the correct value in the field. Set the focus on the text box.
    • Create a function that handles some type of mathematic problem and returns a value.
    • If the user entered in all the required fields, console out any information that is relevant to what they selected to the console along with the answer to the math equation when they press the submit button. This will show that you know how to grab information from the form fields and present it in any future projects. 
  •  Feel free to create any extra variables necessary to accomplish your assignment. Make sure you leave comments. I like to use comments to describe what the line of code does below when it is executed. Reach out to your instructor if you have any questions.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY