Assignment 6-  Thumbnails.ZIP

Assignment 6- Thumbnails

Write a script that presents the user with thumbnails of at least five images. Provide a button underneath each image that when chosen the image will appear full size in a new window for the user to preview. Write code that will create a new window, large enough to display an image. The window will have its content dynamically written to it using document.write() statements. Remember to open and close the data stream to the new window at the appropriate junctures in the code. With the new window, write code that will produce a well-formed HTML document. In other words, include <html, <head, <title and <body tags. Give the new document an appropriate title. Use appropriate CSS code for setting a background color of your choice.

In the new document, create code that will center all the content in the page. Create an <h3 heading, then output the value of the image name, creating an appropriate title for each image. Create an <img tag with the src attribute equal to the chosen image. Include height and width attributes inside the <img tag. Create an HTML form in the new document. Within the form, include a button that is scripted to close the new window. Use the window object's focus() method to ensure that the new window remains visible when the user selects another image to preview.

Zip the files created into a zip file called and submit the zip file.

Your assignment grade will be based on correctness of JavaScript code, readability of the Javascript code, code comments and final HTML page layout.
Powered by