100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

ICT1512 Assignment 11 Hands-On Project 9-1

Rating
-
Sold
1
Pages
9
Uploaded on
05-08-2023
Written in
2023/2024

ICT1512 Assignment 11 Hands-On Project 9-1 solutions In this project you will work on a web page in which customers attach greeting messages to gifts purchased for friends and family. The contents of the greeting message will be entered on one web page form and then displayed as part of a shopping cart on a separate page. Data will be transferred from one page to the next by appending data to a query string. A preview of the shopping cart page with a sample gift card message is shown in Figure 9-22. Do the following: 1. Use your code editor to open the project09-01a_, project09-01b_, and project09-01b_ files from the js09 c project01 folder. Enter your name and the date in the comment section of each file and save them as project09- , , and , respectively. 2. Go to the file in your code editor. Edit the form element so that submitting the form opens the file using the get method. Close the file, saving your changes. 3. Go to the file in your code editor and add a script element linked to the file. Defer the loading of the script until the page finishes loading. Take some time to study the contents of the HTML file and then close the file, saving your changes. 4. Go to the file in your code editor. Apply the slice() method to the h object, storing the text after the first character in the query variable. 5. Use the replace() method to replace very occurrence of the + character in the query variable with a blank space. Apply the decodeURIComponent() method to replace every URI-encoded character in query with the matching character. 6. Appy the split() method to the query string to split the text at every occurrence of the & character, placing each name=value pair as a separate item in the cardFields array. 7. Create a for of loop that loops through every item in the cardFields array. At each iteration of the loop do the following: a. Split each item at the location of the = character, store the substrings in the nameValue array variable. b. Store the first item in the nameValue array in the name variable. Store the second item in the nameValue array in the value variable. c. Store the value of the value variable as the text content of the document element with an id equal to the name variable. 8. Save your changes to the file and then load in your web browser. Enter sample greeting text in the field of the web form and then click the Submit button. Verify that the browser opens the file with the text of the greeting message displayed in the page.

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
August 5, 2023
Number of pages
9
Written in
2023/2024
Type
Other
Person
Unknown

Subjects

Content preview

ICT1512 2023 ASSIGNMENT 11
Hands-on Project 9-1
(with all the source code you need)
***There is a link to the PROJECT zipped folder at the end of this file***


Crystal Indigo!
Crystal Indigo!
Providing all solutions you need anytime
+27 76 626 8187




***copy the code to your editor, run or open with a browser***
Note: do not submit as pdf , CHANGE name and date

, <!-- project09-01a.html -->
<!DOCTYPE html>
<html>
<head>
<!--
JavaScript 7th Edition
Chapter 9
Hands-on Project 9-1

Author: Crystal Indigo
Date: 05/08/2023

Filename: project09-01a.html
-->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Hands-on Project 9-1</title>
<link rel="stylesheet" href="styles.css" />
</head>

<body>
<header>
<h1>
Hands-on Project 9-1
</h1>
</header>

<section>
<h1>Personal Greeting</h1>
<form method="get" action="project09-01b.html">
<fieldset>
<legend>Enter your personal greeting</legend>
<label for="to">To:</label>
<input name="to" id="to" type="text" />
<label for="from">From:</label>
<input name="from" id="from" type="text" />
<label for="msg">Message:</label>
<textarea name="msg" id="msg"></textarea>
</fieldset>
<input id="subButton" type="submit" value="SUBMIT" />
</form>
</section>
</body>
</html>

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CrystalIndigo University of South Africa (Unisa)
View profile
Follow You need to be logged in order to follow users or courses
Sold
486
Member since
5 year
Number of followers
226
Documents
73
Last sold
1 month ago
CrystalIndigo Solutions

providing all solutions to all computer science modules

4,1

51 reviews

5
27
4
13
3
6
2
1
1
4

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions