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
Management of software development consist of?
JulsSmile [24]

Answer:

d. All of the above

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications.

In Computer science, management of software development consist of;

a. Process: it involves the stages through which a software application is analyzed, designed, developed, tested, etc.

b. People: it refers to the individuals involved in the software development process.

c. Project: it's the entirety of the stages a software goes through before it gets to the end user.

5 0
3 years ago
What are the different types of computer operating systems?
MissTica

Answer:Apple iOS. Apple's iOS is a popular operating system for smartphones. ...

Microsoft Windows. ...

Apple MAC OS. ...

Linux Operating System. ...

Real-Time Operating System. ...

Normal Operating System.

Explanation:

3 0
2 years ago
¿por que la toria de lamarck sobre el alargamiento del cuello de las jirafas por el esfuerzo continuado no pasara a sus descendi
Paha777 [63]

Respuesta: Los caracteres adquiridos no se transmiten genéticamente porque no modifican el ADN de los organismos

Explicación:

Jean-Baptiste Lamarck al igual que Charles Darwin, propuso una teoría sobre la evolución que explicaba cambios en los organismos a través del tiempo. La teoría de Lamarck se enfocaba en condiciones en el ambiente que propiciaban cambios en los organismos. Un ejemplo de esto son las jirafas, que de acurdo a Lamarck tenían cuellos largos debido al esfuerzo continuado para comer hojas de árboles altos. Esto significa que la característica de cuello largo era adquirido por las jirafas durante su vida y según Lamarck se transmitiría a sus descendientes.

Sin embargo, se ha comprobado que los caracteres adquiridos no modifican el ADN de los organismos, por ejemplo las cirugías estéticas no cambian el ADN de una persona y por esta razón no son transmitidos a sus descendientes. Por el contrario, en las poblaciones de organismos ciertas características prevalencen en el tiempo debido a la selección natural. Esto significa que el cuello de las jirafas es el resultado que el cuello largo sea una característica beneficiosa que ha prevalecido debido a la selección natural y no de características adquiridas que son transmitidas a descendientes.

7 0
3 years ago
What is processing for a computer?​
iogann1982 [59]

Answer:

is an action or series of actions that a microprocessor, also known as a central processing unit (CPU), in a computer performs when it receives information.

5 0
3 years ago
I've this assignment due before 7 am. Please help, me.
Alenkasestr [34]

Answer:

An observation: Java does not support true multi-dimensional arrays; rather, it supports 1-dimensional arrays, where each element can itself be another 1-dimensional array. The difference is the way memory is allocated, where a[i][j] differs from a[i,j].

Explanation:

5 0
3 years ago
Other questions:
  • The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
    7·1 answer
  • My name Jeff <br><br> what movie is this off of
    6·2 answers
  • Why we call the standard deviation of the sample statistic asstandard error of the statistic?
    14·1 answer
  • What’s an example of software?
    6·2 answers
  • Credible sites contain __________ information,
    7·2 answers
  • Rafi is developing an application to send urgent information about global health crises over the Internet to hospitals. He is wo
    6·1 answer
  • Derek has to create a technical design of a complex floor plan using CAD. What will be most helpful for Derek to use to create t
    8·1 answer
  • Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your program should print each nu
    11·1 answer
  • Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the cou
    13·1 answer
  • After data is collected, how is it analyzed?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!