Objectives

To practice JavaScript functions, one-dimensional arrays, events and for loops.

Overview

For this project you will implement a photo viewer that allows you to look at photos available in a folder. Photos can be seen in sequential order (based on the photo's number) or randomly. A video that illustrates the functionality of the application can be found at: Application Video section.

Grading

Notice that you don't have to submit a fully functional application in order to receive credit for this project. We will look at each one of the above items individually. Students that don't use arrays to implement the project will receive 0 credit for the JavaScript component of the project.

Specifications

Before you start implementing the web page, download the following zip file: p4.zip. This file has a folder named p4 which contains files you will need for the project. You need to write your program in a file named p4.html.

Functions

Your project must define and use the functions below:

Global Variables

In this project you will define and use three global variables. We need these global variables in order to keep track of the array of photos being displayed. These are the only global variables you can have in your project. You will lose a significant number of points if you add additional global variables.

CSS

There will be no css file for this project. Any style information will be provided in the html file (in the head section in between <style></style> tags). The background color for the page is: #FFF1CC. The additional style element you must add is an underline under the Viewer heading and a border around the img element.

Requirements

Application Video

A video showing the functionality of your system can be found at Video. A snapshot of the web site's main page is provided below.

Snapshot main page

Web Accessibility