Question: In the JavaScript file, code a statement that moves the focus to the Arrival date text box when the form is first displayed. 3. Add

In the JavaScript file, code a statement that moves the focus to the Arrival date text box when the form is first displayed.

3. Add jQuery code that validates all the text boxes on the form using the validation and additional-methods plugins. All of the text boxes require a value. In addition, the arrival date, the email address, and phone number must be in valid formats, and the number of nights must be a positive integer.

4. Add custom error messages to the validation for the number of nights that are consistent with the other error messages and that fit on the line that contains the Nights text box

HTML:

Reservation request

Reservation Request

name="reservation_form" id="reservation_form">

General Information

Preferences

Standard

Business

Suite

King

Double Double

Smoking

Contact Information

CSS:

body {

font-family: Arial, Helvetica, sans-serif;

background-color: white;

margin: 0 auto;

width: 600px;

border: 3px solid blue;

padding: 10px 20px;

}

fieldset {

margin-top: 1em;

margin-bottom: 1em;

padding: .5em;

}

legend {

color: blue;

font-weight: bold;

font-size: 85%;

margin-bottom: .5em;

}

label {

float: left;

width: 90px;

}

input, select {

margin-left: 1em;

margin-right: 1em;

margin-bottom: .5em;

}

input {

width: 14em;

}

input.left {

width: 1em;

padding-left: 0;

}

p {

margin-top: 0;

margin-bottom: .5em;

}

input.last {

margin-bottom: 1em;

}

#adults, #children {

width: 35px;

}

#smoking {

width: 1em;

margin-left: 0;

}

#submit {

margin-left: 0;

width: 10em;

}

label.error {

float: none;

color: red;

font-size: 87.5%;

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!