Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As web forms get longer, we very commonly see them split across multiple pages to collect all of the necessary information. There are different reasons

As web forms get longer, we very commonly see them split across multiple pages to collect all of the necessary information. There are different reasons for this. A long form can be daunting for users and a large/long form can be difficult for users to fill out on a mobile device. These forms need to be designed so that the data entered by the user on the forms on each page will be submitted to the webserver simultaneously. This makes more sense as they are part of the same data set. The problem with stateless pages is that if the user moves from one page to the next, the data entered is lost. To bypass this issue, you will need to use query strings, hidden input fields, and cookies.
In this assignment, you will use the previously created registration.html file from the Assignments.zip file linked in Resources to send information to a second page named confirm.html. You will write a script on that page that will save the information from the form to a cookie and then display it on the same page. If the user goes back to this confirm.html page, the page should display the user form data from the registration entry that was last entered.
Tips:
It will help to output the array into the browser console so that you can verify that the string is being correctly parsed. Details on the browser console can be found in the Resources.
To skip having to enter data into the form each time to test, it may help to create a JavaScript function that automatically fills in the fields for you and comment it out when completed.
Instructions
Read the Overview.
Modify the "registration.html" page created in the prior assessment to send a query (that has all input field information from that form) to a second page. When the user presses submit, all of the input fields from the registration.html form will be saved into a cookie. The user should then be forwarded to a second page (confirm.html (created by you)) that will read the cookie information and display it in a name/value pair using JavaScript.
Make sure to do the following:
Create and integrate a script on the registration.html page passes all of the input fields from the form when the submit button is pressed.
Create a confirm.html page that will read in the input from the query string data from the registration.html page and store them into variables first.
Write a script that runs in response to the submit event, that saves the input from the registration.html page to a series of cookies to store each input, and opens a second page called confirm.html that reads and displays information from all the fields.
Once completed, view your pages in your selected web browsers to see if the content renders appropriately and consistently within each. Next, ensure that your HTML code is HTML5 compliant and your CSS code is valid. You may use the Markup Validation ServiceLinks to an external site. for testing the former and CSS Validation ServiceLinks to an external site. for testing the latter, both from W3C. Both of these services are free. Important: Take a screen capture of each of your validation results and save it for submission.
Assignment examples: You may use the assignment examples, Week10Examples.zip to give you an idea of what a Proficient or higher rating on the rubric would look like.
Walkthrough: You may view the following walkthrough videos, linked in the Resources, to help you complete this assignment:
Demonstrate How to Read and Process in the Querystring from the URL Walkthrough.
Demonstrate How to Read and Write to a Cookie Walkthrough.
Submission Requirements
Upload your website files to your web host.
Submit your work in the courseroom using a single Zip file containing the following:
Your entire website and all associated files.
A Word document with:
The url to your website so faculty can view your site on a live host.
A screen capture of each of your two validations that you completed using the developer tools found in the Resources.
Competencies Measured
By successfully completing this assignment, you will demonstrate your proficiency in the following course competencies and scoring guide criteria:
Competency 3: Create interactive Web page functionality using JavaScript.
Integrate a script on the registration.html page that stores the input field data in variables based on query string.
Write a script that runs in response to the submit event that saves the input from to a cookie displays information from all the fields on the confirm.html.
Competency 4: Solve Web use cases and design issues using testing and debugging.
Submit error-free validated code.
Competency 5: Communicate in a manner that is appropriate to the IT profession.
Write developer comments to describe the variables being declared and explain the functions and logical blocks of JavaScript code.

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

What was the first HR error to be made?

Answered: 1 week ago