1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kotykmax [81]
3 years ago
5

Create and integrate a script on the registration.html page that stores the input field data into hidden fields to be used in th

e interests.html page once the submit button is pressed. Create an interests.html page with a form that has the fields listed above. This interests.html page will read in the input from the query string data from the registration.html page and store them into hidden input fields. Write a script that runs in response to the submit event, from the interests.html page, that saves the input from both pages to a series of cookies to store each input, and opens a third page called confirm.html that reads and displays information from all the fields.
Computers and Technology
1 answer:
Pavel [41]3 years ago
3 0

Answer:

Explanation:

// CAPTURE QUERY STRING VALUES

var urlParams = new URLSearchParams(location.search);

var uid = urlParams.get('userName');

var fName = urlParams.get('firstName');

var lName = urlParams.get('lastName');

var pass = urlParams.get('password');

var email = urlParams.get('email');

var phone = urlParams.get('phoneNumber');

var signUp = urlParams.get('signUpNewsletter');

=====================================

Modified the checkbox control into multiple control

<div>

<select id="interests" name="interests" multiple>

<option value="Technology">Technology</option>

<option value="Music">Music</option>

<option value="Movies">Movies</option>

</select>

</div>

==================================

Added a js function to read multiple input values

function getSelectValues(select) {

var result = [];

var options = select && select.options;

var opt;

for (var i=0, iLen=options.length; i<iLen; i++) {

opt = options[i];

if (opt.selected) {

result.push(opt.value || opt.text);

}

}

return result;

}

==============================

Below is how I create cookie object

ar data =

{

uid:document.myForm.userName.value,

fName: document.myForm.firstName.value,

lName: document.myForm.lastName.value,

pass: document.myForm.password.value,

email: document.myForm.email.value,

phone:document.myForm.phoneNumber.value,

signUp: document.myForm.signUpNewsletter.value,

interests: getSelectValues(document.myForm.interests).toString(),

comment: document.myForm.comment.value,

referredBy: document.myForm.referredBy.value,

};

var dataString = "uid=" + data.uid + ",fName=" + data.fName + ",lName=" + data.lName + ",pass=" + data.pass + ""+ +",email=" + data.email + ",phone=" + data.phone + ",signUp=" + data.signUp + ",interests=" + data.interests + "" + +",comment=" + data.comment + ",referredBy=" + data.referredBy + "";

===========

Make sure you write last line in single line

You might be interested in
Is media good for the brain?
skad [1K]

Of course yes, and that depends of the type of content that you eaten =D

Media is a source of good information for to create your opinion.

Best regards

7 0
3 years ago
Read 2 more answers
Q.No.3 b. (Marks 3)
Vilka [71]

Answer:

The change in complex systems can be explained according to the relationship of the environment where the system is implemented.

The system environment is dynamic, which consequently leads to adaptation to the system, which generates new requirements inherent to changes in business objectives and policies. Therefore, changing systems is necessary for tuning and usefulness so that the system correctly supports business requirements.

An example is the registration of the justification of the requirements, which is a process activity that supports changes in the system so that the reason for including a requirement is understood, which helps in future changes

Explanation:

7 0
3 years ago
When making an assembly of design what command is most.commonly used?
Schach [20]
There are two common command lines used in creating design assembly. The 'push' and 'pull' command. Both allows you to get parts from the original predelivered content's source desgian    and recreate the design faster and with less memory.
6 0
3 years ago
To prevent rust from forming, a light coating of_____should be applied to all machined surfaces
Fantom [35]
What is that I never heard of that before
4 0
3 years ago
What is most important for you to choose before you build a network?
lbvjy [14]

i'm needing help with the same question but mine gave choices, could you help please? thanks

A.  

private network

B.  

NOS

C.  

network media

D.  

network protocol

E.  

directory service

3 0
3 years ago
Other questions:
  • How do smart watches affect the business and its position in the global marketplace?
    12·2 answers
  • Launched in 1995, ________ has become the most popular web browser.
    6·1 answer
  • HELPPPP!!
    8·2 answers
  • List and describe the tools for all the main stages of app/application development.
    11·1 answer
  • The auxiliary device used to store large volume of data and program for future is called​
    10·1 answer
  • So im new how exactly does this point system work???​
    6·1 answer
  • How many cubic millimeters are present in 0.0923 m3?​
    14·1 answer
  • A pseudo code that asks the user for their forename and their surname , and then outputs both, separated by a space to the user​
    13·1 answer
  • Pleaseeeee helpppppppp​
    7·1 answer
  • Which internet explorer security feature restricts the browsing session information that can be tracked by external third-party
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!