Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do all steps (1-4). index.html file: Reservation request Reservation Request General Information Arrival date: * Nights: * Adults: 1 2 3 4 Children: 0

image text in transcribedPlease do all steps (1-4).

index.html file:

Reservation request

Reservation Request

General Information
*
*
Preferences
Standard Business Suite
King Double Double
Smoking
Contact Information
*
*
*

reservation.css file:

body { font-family: Arial, Helvetica, sans-serif; background-color: white; margin: 0 auto; width: 600px; border: 3px solid blue; padding: 0 2em 1em; } h1 { color: blue; } div { margin-bottom: 0.5em; } fieldset { margin-top: 1em; margin-bottom: 1em; padding: .5em; } legend { color: blue; font-weight: bold; font-size: 85%; margin-bottom: .5em; } label { display: inline-block; width: 6em; } input, select { margin-left: 1em; margin-right: 0.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; } span { color: red; }

reservation.js file:

"use strict";

$(document).ready( () => { const emailPattern = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b/; }); // end ready

response.html file:

Reservation Request

Thank you for your request!

We will contact you within the next 24 hours.

Name: Email: Must be a valid email address. Phone: This field is required. 1. Open the application in this folder: Then, run the application and click the Submit Request button to see the page that's displayed when the form is submitted to the server. 2. In the JavaScript file, note that the ready event handler contains the declaration for a constant named emailPattern that contains the pattern that will be used to validate the email address. 3. Code a statement that moves the focus to the "Arrival date" text box. 4. Code an event handler for the submit event of the form. This event handler should validate the user entries. If any of the entries are invalid, the code should cancel the submission of the form. The validation is as follows: A value must be entered into each text box. The number of nights must be numeric. The email address must match the pattern that's provided. Be sure to trim the entries and put them back into the controls regardless of whether the entries are valid

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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions