Due date: March 28, 2001.
(1) Write a HTML/Javascript program, h5q1.html, to display the following form with two checkbox input elements as the major input:
When the "Check all colors" button is clicked, the page is updated to:
Note that all colors are now checked. Note also that there was no form submission. (This is not a realistic page as there is no submit button.) When the "Uncheck All Colors" button is clicked:
Note that all checked colors are now unchecked. If we start with:
Clicking the "Toggle All Tech" button results in:
You should develop your program to create output as close to the screens above as possible.
(2) Write a HTML/Javascript program, h5q2.html, the display images in sequential of random orders. The images are stored in the subdirectory "images" with file names img1.jpg, img2.jpg, etc. Your program may contain a global constant NUM_OF_IMAGES for easy porting. The page displays initially:
Note that the first image "img1.jpg" is displayed.
Clicking the "next image" button displays the next image, "img2.jpg":
Clicking the "random image" displays a random image that is not the same as the current one, for example:
In Netscape, the images may be confined to a size of the first image and that is acceptable. You should develop your program to create output as close to the screens above as possible.
The test image files (img1.jpg to img6.jpg) are: