CCSF Spring 2010 / CNIT 133 Homework 8 - Object & Event Model


Link to... Description
Part 1 Create a webpage that contains a script that will input a user's name and then display a greeting to the user which contains the name and version of the user's browser, and the user's platform. Use navigator.appName, navigator.appVersion, navigator.userAgent and navigator.platform. The greeting can be displayed as either XHTML generated output, or by an alert. [Note: navigator.platform is Win32 for a PC and is MacPPC for a MAC.]
Part 2 Create a webpage in which users are allowed to select a page layout and formatting through the use of the className property. Choose among radio buttons, select items and buttons to allow the user to change the background color, font size, font family, font style, and font weight.
Part 3 Create a page that has a header of Password Protection Page, a form password element, and submit and reset buttons. I suggest that you name your password as obama. If the password entered is incorrect then alert "password is incorrect" and remain on the page. You may use javascript (insecure) or a php file (secure) to do this part. If the password is correct then allow entrance to a second page that contains a script that contains three hotspot labels, "Stop", "Caution", and "Go". When the user mouses over the "Stop" hotspot, the background color of the browser window should turn red. When the user mouses over the "Caution" hotspot, the background color should turn yellow. When the user mouses over the "Go" hotspot, the background color should turn green. When the user mouses off of any of these hotspots, return the background color to the original color of the browser window.
Part 4 Write a script that utilizes a top navigation bar of general links and expands to several specific links when the user does a mouseover on a general link. Make sure that the drop-down links are clickable.


Valid XHTML 1.0 Strict Valid CSS!