Docsity

JavaScript Program - Internet Technologies - Past Exam, Exams of Internet and Information Access

Toggle sidebar
bg1
Cork Institute of Technology
Bachelor of Science (Honours) in Software Development &
Computer Networking - Award
(NFQ – Level 8)
Summer 2007
Internet Technologies
(Time: 3 Hours)
Instructions
Answer FOUR questions
All questions carry equal marks.
Examiners: Dr. J. Buckley
Dr. A. Kinsella
Mr. C.E. Manning
Q1. (25 marks)
Part A (8 marks)
Using the checksum determine if 5313198NW is a valid PPS number.
[You must show your work. No marks for a simple yes or no]
Part B (17 marks)
Write a JavaScript script that inputs an ISBN and validates it using the checksum. If the number is
valid the script should set a variable valid to true, and to false if it is not valid.
pf3
pf4
pf5

Partial preview of the text

Download JavaScript Program - Internet Technologies - Past Exam and more Exams Internet and Information Access in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Science (Honours) in Software Development &

Computer Networking - Award

(NFQ – Level 8)

Summer 2007

Internet Technologies

(Time: 3 Hours)

Instructions Answer FOUR questions All questions carry equal marks.

Examiners: Dr. J. Buckley Dr. A. Kinsella Mr. C.E. Manning

Q1. (25 marks) Part A (8 marks) Using the checksum determine if 5313198NW is a valid PPS number. [You must show your work. No marks for a simple yes or no]

Part B (17 marks) Write a JavaScript script that inputs an ISBN and validates it using the checksum. If the number is valid the script should set a variable valid to true, and to false if it is not valid.

Part A (20 marks) A website saves cookies on the user’s computer so that they can be greeted by name when they return. Write a JavaScript program that reads the cookies to determine the user’s surname and sex and greets them appropriately with Mr. or Ms.

e.g. Welcome Mr. Murphy e.g. Welcome Ms. Perez

The surname is stored in a cookie called sname. The cookie called sex holds either “male” or “female”. You may not assume that the cookie is present for every user. If the cookie is not found, the user should be greeted with “Welcome”.

Part B (5 marks) For security and privacy reasons cookies are not generally available to every server that requests to see them. Apart from the page what wrote the cookie initially, what other pages (if any) may view a cookie?

Part A (18 marks) MegaCorp uses an 600 x 400 pixel image map called magacorp.jpg for navigation on the main page of its website index.html. The image map has links to the four other pages on the site: news.html , aboutmegacorp.html , products.html , and services.html. Write the html code for index.html.

Part B (7 marks) Outline the main differences between client side image maps and server side image maps.

Part A (15 marks)

Write the HTML required to specify the table illustrated below.

Mary had a Little lamb

Its fleece Was white as snow

She went to Dún Laoghaire

And she went to CIT She

almost

To Cork

Everywhere that Mary went the lamb was sure to go

You may assume that all type is the default font and size. CIT is a link to the CIT homepage. The centered lamb image is 100x100 pixels and is named “lamb.gif”

Part B (10 marks)

Write the HTML required to specify the list illustrated below.

  1. Ireland
    • Cork o Bishopstown o Ballincollig
    • Dublin o Ranelagh o Rathmines
  2. USA
    • San Francisco
    • New York
  3. Spain
  4. Portugal