CS 101 - Intro to Computing, Spring 2008

Lab 5

JavaScript

For this assignment, we will want to write the JavaScript code in a separate file that wwe will refer to from inside our web page. For this we will need to use the src attribute of the <script> tag.

For this lab, we will want to explore a few more parts of the document object in JavaScript. Check out http://www.w3schools.com/htmldom/dom_obj_document.asp for a discussion of more items.

Lab Assignment 5

Due: Tuesday 2/19/2008 by 11:59 pm

For this lab assignment, complete the following:

  1. Create a JavaScript file that will write the following to an HTML document: The information must be printed in a some readable/understandable format. Such a format for the number of images contained would be:
    This page contains 3 images.

  2. Create an HTML file that lists:

  3. This web page must be placed in your web space (in your WWW directory) on your CS account.

  4. You are also required to put a link on your CS Home Page to the page you created for this lab.

    Verify that your link and the file are viewable via a web browser from the URL of:

         http://www.cs.uic.edu/~USERID
    
    where USERID is your CS account login name.
    
    You can check this out via the link to your home page on the CS 101 Student List page. Once you are at your home page, follow the link you added to your home page for this lab assignment.

  5. You are also to submit the HTML file and the JavaScript file electronically by using the UNIX turnin command.

    To use the UNIX turnin command to electronically hand-in your html file using the project name of lab5. To submit the file in <filename> for lab5, the turnin command is entered as:

         turnin -c cs101 -p lab5 <filename>
    
    To submit multiple files, list them after the name of the project. Thus if your HTML file has the name of lab5.html and your JavaScript file has the name of lab5.js, the command would be:
         turnin -c cs101 -p lab5 lab5.html lab5.js
    
    To verify what you submitted using the turnin command type:
         turnin -c cs101 -p lab5 -v
    

Grading Criteria