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
Having friends who cause you stress can decrease your happiness, which can in turn
Marrrta [24]
Make you depressed? (wild guess) (new to this)
4 0
3 years ago
Read 2 more answers
An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
denis-greek [22]
The answer to your question would be service writer. The service writer's job, is to log all information and such, and generally decide what happens.
4 0
3 years ago
Hey how are yall today?
Luda [366]

Answer:

Great how are you today?

5 0
3 years ago
Read 2 more answers
What are parts of the prewriting process
Ket [755]

Solution:

In composition, the term prewriting refers to any activity that helps a writer think about a topic, determine a purpose, analyze an audience, and prepare to write. It is closely related to the art of invention in classical rhetoric.

These are the parts of prewriting process:

• Prewriting. You're ready to start writing. ...

• Writing. Now you have your plan and you're ready to start writing. ...

• Revision. Your story can change a great deal during this stage. ...

• Editing. You have overhauled your story. ...

• Publishing.

This is the required answer.

7 0
3 years ago
What characteristics of IT careers can be a challenge for employees
IRINA_888 [86]

It is essential to continually be learning about new technology.(APEX VERIFIED)

8 0
3 years ago
Read 2 more answers
Other questions:
  • Why are there 2 types of ip addresses like 172.16.254.1 or 2001:db8:0:1234:0:567:8:1?
    10·1 answer
  • Write a class named Car that has the following data attributes: • _ _year_model (for the car’s year model) • _ _make (for the ma
    15·1 answer
  • What is cutting-edge technology
    6·1 answer
  • Which category of software would programming languages fall into?
    8·2 answers
  • How are people using lying today? What are the types of lying? Describe each type.
    7·1 answer
  • You are required to copy in your attendees' emails from outside of Outlook when creating a meeting
    6·2 answers
  • Turns on her laptop and gets the error message "OS NOT FOUND." She checks the hard disk for damage or loose cable, but that is n
    11·1 answer
  • Part of the operating system core is responsible for controlling security, managing the file system, and providing a platform fo
    6·1 answer
  • Explain the role of protocol and standard organization in facilities interoperability in nertwork communication ​
    13·1 answer
  • When users connect to the network, they use a basic hardware terminal to access a desktop hosted on a virtualization server. wha
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!