Dit2210 Internet Programming Reg Supp

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

UNIVERSITY EXAMINATION 2017/2018

SCHOOL OF COMPUTING AND INFORMATICS


DEPARTMENT OF INFORMATION TECHNOLOGY

DIPLOMA IN BUSINESS INFORMATION TECHNOLOGY & DIPLOMA IN


INFORMATION TECHNOLOGY
REGULAR

UNIT CODE: DIT2210 UNIT TITLE: INTERNET PROGRAMMING

DATE: AUGUST, 2018 SUPPLIMENTARY/SPECIAL EXAM TIME: 2 HOURS

Instructions: Answer question one and other two

a) Define JavaScript as:-


i. A scripting language
ii. As a platform independent language
iii. As a secure web scripting language (6 Marks)

b) Briefly, what’s the difference between JavaScript and Java? (2 Marks)

c) What is the difference between declaring a variable and assigning it a value?


(2 Marks)
d) Explain any three places where JavaScript code can be placed. Illustrate how
each method is achieved. (6 Marks)

e) Using examples, explain the difference between document.write and


document.writeln (4 Marks)

f) Explain the importance of commenting scripts (2 Marks)

Library Copy Page 1


g) What is typeof() operator? How is it used

h) How can we validate fields of form? Explain form validation with example.
(4 Marks)
i) Write JavaScript code that allows you to go back or forward to pages in the
history list. By use of two buttons as shown below (5 Marks)

j) Explain how to write and call user defined function with its example. (2 Marks)

k) Using examples explain alert, prompt and confirm dialog boxes.


(2 Marks)
l) What is the difference between a document object and window object?
(2 Marks)

Section Two
Question Two

a) Explain the following as used in web development. (6 Marks)


i. POST and GET
ii. Function
iii. Dynamic web page

b) Using a function, Write JavaScript code that can be used to validate the contents
entered in the Age and Email textbox. Age must be a number and both text
boxes should not be empty. The email entered should be valid. (8 Marks)

c) Explain the three main types of operators used in JavaScript. (6 Marks)

Library Copy Page 2


Question Three

a) State and explain Four uses of JavaScript. (5 Marks)

b) Using examples, Discuss the three main types of loops used in JavaScript.
(9 Marks)
c) Write JavaScript code to display Good morning, Good afternoon, Good evening
depending upon the system time. (6 Marks)

Question Three

a) Discuss four data types used in JavaScript (8 Marks)

b) What is an array? When can it be used? (4 Marks)

c) Differentiate between client side scripts and server side scripts (4 Marks)

d) Discuss the use of the following terms and functions (4 Marks)


i. parseInt ()
ii. parseFloat()

Question Four

a) What are functions and How are functions useful in JavaScript? (3 Marks)

b) Using examples explain alert, prompt and confirm dialog boxes. (6 Marks)

c) Discuss the following web technologies (8 Marks)


a. CSS
b. HTML
c. XML
d. PHP

d) What is the significance of validating data before submission to a server based


program (3 Marks)

Library Copy Page 3

You might also like