IT350 - Web and Internet Programming

Lab 05 - Working with JavaScript

Introduction

This week we've introduced the scripting language JavaScript and shown you how it can be used to customize and animate the user's experience. For this lab you will practice using this knowledge on some warm-up exercises and then create a dynamic table generator.

 

Note that you have two weeks to work on this lab – see the calendar for specific due dates.

 

Read this lab completely before you begin.

Requirements

You must create a folder on your web drive called "Lab05" (without the quotes) and store your work in that directory.  Copy your work from Lab03 (not Lab04) into this directory.


Your web page must be constructed using Notepad or a similar text-only editor. The use of programs such as Microsoft Word, Microsoft Frontpage, DreamWeaver, ColdFusion, Mozilla Composer, etc. will be considered an honor offense.

 

Your pages should have a prelude specifying the type of HTML5 document it is, and should generally look like HTML5 – but you are no longer required to validate.  You are though, encouraged to do so – you will lose credit for pages that don’t display properly in other browsers because of invalid HTML5.

 

Note that all vars are global for the life of the page.  This means that vars are persistent and available to other parts of a script (or other scripts, if you have more than one).

 

Extra Credit

For a nominal amount of extra credit do some/all of the following:

1.      Modify your table generator so that you can make some cells span rows and or columns.  Describe on the back of the cover sheet how the user can do this (although ideally it should be self-explanatory from using your page).

2.      There’s a lot more you could do with a dynamic table generator.  Make some other enhancement and describe what it does (you may want to check with your instructor first to make sure this is suitable for credit).

Deliverables

  1. Your pages should contain all of the elements described in the requirements section above.
  2. All of your files should be in a folder called "Lab05" (without the quotes) on your web drive. Your instructor will assume that your web pages are viewable at http://zee.cs.usna.edu/~mXXXXXX/Lab05/index.html (and table.html, and greeting.html if appropriate) where XXXXXX is your alpha number. You may want to check that this URL is viewable and that everything works correctly from a computer where somebody else is logged in. If you've goofed and linked to a file on your X drive, this will help you catch it!
  3. Turn in the following hardcopy at the beginning of class on the due date, stapled together in the following order (coversheet on top):
    1. A completed assignment coversheet.  Your comments will help us improve the course.
    2. A printout of the source to your Lab05/greeting.html file if you have one, or Lab05/index.html otherwise.
    3. A printout of the source to your Lab05/table.html file.
    4. If you use any external script files, include a printout of those too.