CIW Course Revision Site


Tutor Marked Assignment JS TMA-07A

In a Nutshell - CIW Course Section 2 Part A

JS TMA-07 - CD Access Code: not required

This is a demanding and time-consuming assignment. I have received a number of emails from other CIW students who have found this very difficult.

If you find yourself at a complete loss then click HERE.

Part A.

Q1. Complete the following task:

Create an HTML page containing JavaScript coding which displays the following navigator object properties: appCodeName, appName, appVersion and language. In addition, a child window should open to display these further navigator object properties: mimeTypes, platform amd userAgent. All of the information should be displayed in a clear, easy to read form (the use of tables can help in this, but is not essential). Note that mimeTypes is an array and so cannot be output in a single statement (think for loop). It also may be empty depending on your browser configuration, in which case a suitable message to that effect should be shown.

Q2. Complete the following task:

Create an HTML page incorporating JavaScript coding that performs the following tasks:

  • prompts the user to enter a value between 1 and 12 (inclusive);

  • if the value falls outside this range (e.g. 0 or 13) then an alert box should display a suitable error message, after which the  prompt should be repeated;

  • on entry of a value within the correct range the user should be present with a multiplication table showing their input value multiplied between 1 and 12 times;

  • this multiplication table should be displayed in an HTML table, with 13 rows and five columns; the first row should contain a suitable heading which includes the input value in merged fields; the five columns should contain the multiplying value (from 1 to 12), the word "times", the input value, the word "equals" and finally the result, for example, if the user were to input the value '5' then the table should display:

  • 5 Times Table
    1 times 5 equals 5
    2 times 5 equals 10
    3 times 5 equals 15
    4 times 5 equals 20
    5 times 5 equals 25
    etc....
    11 times 5 equals 55
    12 times 5 equals 60

    the table header should have a light grey background, with the lines of the multiplication table having alternately light blue and light yellow backgrounds.

Q3. Complete the following task:

Create a Web page, divided vertically into two frames of 25% and 75% width respectively. In the left hand frame you should display a vertical list of values from 1 to 12 from top to bottom (presented using JavaScript coding). Each of these values should be a link to update the contents of the larger, right hand frame. Once the user clicks a value, the right hand frame should display the multiplication table for the value, in a similar manner to the coding for question 1.

Q4. Complete the following task:

Create a Web page containing a form. This form should contain the following input fields: full name (a text field) and a date (another text field, with input required in the form DD/MM/YYYY). Each text field should have a suitable label to identify what is required to be input within them. The contents of each text field should be checked on a blur event to ensure they are not empty. Once both text field have suitable contents you should perform checks on the content as follows:

  • the full name text field contents should start with a letter, contain at least one space, and end with a letter;

  • the first and second characters of the date of birth field should be digits, as should the fourth and fifth characters, and the seventh, eighth, ninth and tenth characters.

If the contents of a field, or both fields, does not match the requirements above you should clear the contents of both and display a suitable error message in an alert box. If the contents are validated, you should display an alert box with the following message: "Hello <Initial(s)> <Surname>. Dis you know that on your next birthday you will be <age> years old?". The initials and surname should be obtained from the full name text field. The age value should be accurately calculated by comparing the input date to the current date. So for example, if the user inputs "Tony Charles Lynton Blair" in the name field and "06/05/1953" in the date field the resulting output should be (if the current date is the 12/01/2004):

Hello T. C. L. Blair. Did you know that on your next birthday you will be 51 years old?

I don't believe the marking is too stringent for any of these tasks. I revisited the above question when I began creating this page and discovered my code did not meet the requirements in a number of areas, and it was flawed in that, an endless loop could be entered which locks the browser. Nevertheless I received 100% score for the assignment!

Part B.

Q1. You should design a web site using the following specification:

The site should advertise and take orders for CD's, DVD's and VHS Videos.

The main page for the site should be divided into three frames, with the dimensions approximately as shown: below:

Frame Dimensions
  • frame 'a' should display the site logo and main navigation bar, formed from an image map containing at least the following five buttons: CDs, DVDs, Videos, Contact and Checkout.
  • selecting either the CDs, DVDs or Videos button should update frame 'b' to display the selection of at least 5 titles (of your choice) for each category (i.e. 5 CDs, 5 DVDs and 5 Videos). Each title should be a hyperlink, which when clicked updates frame 'c' to show detailed information on that particular CD/DVD/Video (with image(s) if possible).
  • within the detailed information page (to appear in frame 'c') should be an order button with which the user can add the currently selected item to their shopping cart, by way of cookies (hint: if you hold the items within an array then you can simply store the array indexes, rather than detailed item information, in the cookie).
  • the Contact page should include a form with which users can submit requests for items that do not appear in the main site. Include fields of your choice that will cater for this. Also include validation to ensure that blank fields are not permitted. On submitting the form the user should be presented with the information they entered, displayed in a readable manner.
  • the Checkout page should check the cookie and display the currently ordered item/s, or a suitable message if no items have been selected. Each item should be displayed on a separate line within a table, along with the default quantity (1), price and total. Below the rows of items and prices, a sub-total, VAT total and grand total should be shown for the items as a whole. Each item quantity should be displayed in an editable field, so that the user can update the number of each item. An "update" button must be provided so that any changes made to the item quantities can be recalculated within the table.
  • extra marks will be awarded for further use of JavaScript, e.g. in handling mouseOver events for image changing. Also, the overall look and feel of your site, in particular the use of graphics, colours and fonts, will be judged and marked.
  • you should choose a suitable site name and provide a logo based on this name, along with any other colours and graphics you feel would be suitable to blend in with those stipulated above.
  • You must submit your design. The design itself can be handwritten or produced using a word processing/design package, etc.

Q2. We now want you to put your design into practice. You can:

  • supply a web site address for us to view your site, or

  • supply the site on floppy disk, but remember that the size of the site will certainly be an issue you need to consider. You can, of course, use WinZip, or

  • supply the site on CD-ROM.


If you are really stuck with this assignment, then I will gladly send you a copy of my solution. I will need to make a modest administrative charge for this, and I would strongly advise that you edit it extensively before submission. In particular, I would recommend you use your own graphics. My solution is not perfect, but it did receive a score of 100% and it should give you some ideas.

The charge for this will be £2.75 (UK Pounds) and payment is only possible via PayPal.

The files will be compressed with WinZip and may be downloaded via the PayLoadz service that you will be directed to after payment is complete.

Sign up to PayLoadz

to sell your file downloads.

Design by Fife Web Design

Certified Internet Webmaster

Page last Edited: 05 Jan 2007