Question: USING HTML and JAVASCRIPT Create a Contact page that includes: A) A form for new clients to fill out and submit The form must contain

USING HTML and JAVASCRIPT

Create a Contact page that includes:

A) A form for new clients to fill out and submit

The form must contain the following fields:

o First Name

o Last Name

o Street Address

o City

o State

o Zip Code

o Message

B) A button labeled Submit

When the button is clicked, the data in the form should be validated.

Validation should confirm that all input meets the following requirements:

o All fields are required and therefore must contain some data.

o The data in the First Name field must be greater than 1 character and less than 20.

o The data in the Last Name field must be greater than or equal to three characters, and less than 20.

o The data in the State field must be exactly two characters.

If the form contains any invalid data based on the rules defined above, a glyphicon-remove icon should be displayed next to the field (HINT: By adding/removing one more classes to/from a span via a JavaScript, glyphicons can toggle on/off dynamically) and an alert message should be displayed instructing the user to fix the error.

o NOTE: If invalid data is corrected, the glyphicon-remove should be removed.

If all fields are validated as containing correct input, a confirm window should be displayed.

o The confirm window should include the following content:

The content from all fields

A request for the user to confirm the input with OK, or CANCEL to edit

o If the user selects OK in the confirm window:

An alert window should be displayed indicating that the message was sent, along with a date/time stamp of the current time.

The form should be reset (all text should be cleared and no glyphicons should be visible).

o If the user selected CANCEL in the confirm window:

The confirm window should close and all user data should remain in the form.

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!