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
Double clicking a word selects the entire word?
igor_vitrenko [27]
Yes. This is correct. :)
7 0
3 years ago
Read 2 more answers
If you double the force of and object what happens to the acceleration
Vera_Pavlovna [14]

Answer:

As we increase the force on an object the acceleration increases proportionally. Since the mass does not change as the acceleration increases, we can say that force is equal to acceleration

7 0
3 years ago
Maria is conducting a security investigation and has identified a suspect. The suspect is an employee of the organization who ha
Snowcat [4.5K]

Answer:

k12

Explanation:

8 0
2 years ago
You have dinner with your family and tell them that you have taken bcis. your mother tells you that she is proud of you and that
VikaD [51]
The answer is (D) <span>I'll show you how to set up a simple database with one table called 'recipes.' You'll be able to manage it and run simple queries on it to find specific recipes very quickly and easily. All you need is some rudimentary knowledge of access to get the job done.
</span>

Spreadsheets are not bad for number crunching. However, if you have lots of data, you may benefit from efficient data management tool. Replacing spreadsheets with databases help you manage data centrally, safely and securely. By employing a database, you can avoid making mistakes like miscounts and data entry errors.

Learning Access can be a little bit daunting and intimidating. Through self-dedication, one can conquer and learn to create simple but functional database.


4 0
4 years ago
What is the first step a user should take toward generating an index?
Ad libitum [116K]

Answer:

I think that it's A

Explanation:

5 0
3 years ago
Other questions:
  • Are headphones considered a computer? Why or why not?
    13·2 answers
  • Differentiate between Software as a service, platform as a service and infrastructure as a service.
    14·1 answer
  • 4. Together, what do the divisions of the DHSMV do? A. Make sure lines are long B. Use more money than other government organiza
    14·1 answer
  • You are the network administrator for Slimjim, a peripheral device company. The network uses Linux, and you need information on
    10·1 answer
  • Number 20, can anyone help?
    11·1 answer
  • What is copy and paste?
    13·2 answers
  • Consider a system consisting of processes P1 , P2 , ..., Pn , each of which has a unique priority number. Write a monitor that a
    14·1 answer
  • What is the volume of a rectangular prism with a length of 812 centimeters, width of 913 centimeters, and a height of 1225 centi
    12·1 answer
  • A natural language processor reads the sentence The walk was tiring and mistakes the noun “walk” as a verb. What is such an erro
    13·1 answer
  • Which type of relationship is responsible for teaching you values and how to communicate?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!