Internet Based Programing
Internet Based Programing
a) One of the most common uses of event handler is to display a message on the status
line when the user moves a mouser over a link. Write JavaScript code to:
(i) Display the message “Order a product” on the status line. (3 marks)
(ii) Clear the status line. (2 marks)
b) An organization would like to design and upload a website where users are required to
interact with the site and the site can validate users’ inputs. Explain to the
management the advantages and disadvantages of using JavaScript as compared to
other scripting languages. (5 marks)
c) Write a JavaScript statement that will allow voters to input their names and age then
validate if age is greater or less than 18. If it is greater than 18, the message “You are
allowed to vote” should be displayed otherwise the message “you are not allowed to
vote”. (8 marks)
a) Write a JavaScript embedded in HTML statement to create a form having 2 textboxes, radio
buttons, a checkbox and a reset button. On clicking the reset button, the entire form is
reset
(Cleared). (6 marks)
b) Write html code that will be able to create links to the following. (6 marks)
(i) A picture file adminblock.mpeg
(ii) A web page www.nba.com
(iii) A section named section1 within the document
Design a website that will facilitate field salesmen to calculate discount and net price where
net price = total price – discount. (6 marks)
c) Design a JavaScript code to create 2 radio buttons named “Square” and “cube” and a
text box to input a number such that if the square radio button is active, the number
will be squared and if the cube radio button is active, the number will be cubed.
(5 marks)
d) Before 1990 Internet connection was expensive with only a few organizations in the
developed countries connected to the internet. Today internet is one of the most
popular means of communication and sharing information. Discuss the factors that
have contributed to a widespread use of internet. (5 marks)