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]
2 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]2 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
Consider the following method, inCommon, which takes two Integer ArrayList parameters. The method returns true if the same integ
sp2606 [1]

Answer:

The answer is "Option b".

Explanation:

In the given code, a static method "inCommon" is declared, that accepts two array lists in its parameter, and inside the method two for loop is used, in which a conditional statement used, that checks element of array list a is equal to the element of array list b. If the condition is true it will return the value true, and if the condition is not true, it will return a false value. In this, the second loop is not used because j>0 so will never check the element of the first element.

6 0
3 years ago
The first query is computationally less expensive than the second query. (Assume no indexes exist on release_date.) Query 1: SEL
sdas [7]

Answer:

false

Explanation:

The term 'computationally expensive' means that a given mathematical function, code or an algorithm has high computational complexity. In addition, the mathematical function or algorithm will require several steps and procedures to be completed. Based on this, the statement made in this question is not true.

7 0
3 years ago
Janelle is organizing an outline for an investigative report about the benefits of taking a 30-minute walk each day. which of th
Xelga [282]

Answer:

Err. I'm getting vibes from C.

Explanation:

Janelle is organizing an outline for an investigative report about the benefits of taking a 30-minute walk each day.

Benefits - Good/Helpful

8 0
3 years ago
Read 2 more answers
PLEASE PLEASE PLEASE HELP!! WILL GIVE A BRAINLIEST IF UR RIGHT!!
Nataly_w [17]
1. spreadsheet
2. Computers will continue to become smaller in size and become faster

3 0
3 years ago
fill in the balenkes ) 1)there are ................................... function keys on the keybord 2)pressing the end key moves
Doss [256]

Answer:

1.) There are 12 function keys 2.) The return Key

Explanation:

6 0
3 years ago
Other questions:
  • What is the primary purpose for a screen saver in windows?
    8·1 answer
  • EBay buyers voluntarily comment to other users and sellers on the quality of service, promptness of shipping, and their general
    5·1 answer
  • Which statement best describes antivirus software
    12·2 answers
  • Proxy data:
    12·1 answer
  • A disadvantage of creating a website with tables, without CSS is
    15·2 answers
  • A top-notch IT company is seeking an experienced leader to direct a team of experts in the development, creation, and modificati
    14·2 answers
  • The browser on which you are viewing web pages is called the
    13·1 answer
  • What is "mob of the dead"?
    7·1 answer
  • 2. Which of the following is a shortcut key to Exit from any operation?
    10·2 answers
  • When spraying pesticide wear and protective eyeglass​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!