Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions