Question: Both codes Week 8 Lab - JavaScript DOM and Arrays Order Form Personal Information First Name: Last Name: Address: City: Province: Select a province British

Both codes

Week 8 Lab - JavaScript DOM and Arrays

Order Form

Personal Information
First Name:
Last Name:
Address:
City:
Province:
Postal Code:
Order Information
Select your products: Widget #1 Qty @ $5.00/ea
Widget #2 Qty @ $15.00/ea
Widget #3 Qty @ $25.00/ea
Shipping Type: Standard ($5.00)
Express ($10.00)
Overnight ($20.00)
Submit Order

-------------------------------------------------------------------------

JavaScript DOM and Arrays

Form Submitted Successfully

----------------------------------------

Instructions

The form provided is a basic order form for 'widgets'. The form accepts some personal information, item quanitites, and a shipping method. Your task is to ensure that the user inputs the correct data. In particular:

1. The firstName, lastName, address, city, province, and postalCode fields must all have a value.

2. The postalCode field must be 6 digits long

3. The quantity fields for the widgits must contain a number greater than or equal to zero

4. At least one item must be ordered

The user must be notified of the errors in the form. I am going to allow for some creativity on your part on how this is to be done. The only requirement is that it is clear to the user which fields have errors, and what the errors are.

Finally, if the form submission is valid, display an alert to the user confirming the successful submission of their form, and inform them of the total price. If there are errors in the form, it should not submit.

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!