Course web page: Introduction to problem solving with applications James Tam Return to the course web page

Due Wed April 13  at 4 PM

A4: JavaScript Web Page Programming

As usual all students begin with a grade point of zero on this assignment. Implementing the features described below will earn you grade points equal to the value specified in the brackets.

Part I: Webpage with html tags

Sample themes for the page include a personal page, a page your favorite organization or group (sports team, charity, hobby etc.) Generally you are pretty free in your choice of website theme. However it should be something that is appropriate for a university assignment submission. (You should be able to apply a common-sense filter as to what is and isn't allowed but if you are unsure then feel free to ask!)  To make sure that you comply with copyright laws the multi-media content that you imbed in your document should either be images and videos that you have made yourself (e.g., a picture that you took) or else material where the license agreement allows for public use by others. When in doubt it's safer to simply 'link' to an external website rather than directly post the material yourself on your university page. If you don't know the difference between imbedding an image or video vs. external links then apply the following criteria. If the image or video resides in the 'public_html' folder (or a sub-folder) then you have to worry about copyright (because you are the one providing the content). If the image or video resides on another computer web server (e.g., www.youtube.com) then whoever posted the content must worry about copyright.

The university provides some information about the current state of copyright issues for academic use: [Information link here]

The structure for an example webpage is shown in Figure 1.

Figure 1: The text is separated into a title, sections and section headings

Part II: Webpage augmented with JavaScript. In addition to getting marks for the working JavaScript functionality (described below) this part of the submission will be marked according to program-writing style and documentation requirements that you have been taught in lecture.


Figure 2: Graphical controls created using html tags

The website should allow visitors to enter their contact information via text input fields: title, first & last name. There will be two buttons: 'cancel' that clears all of the input fields and 'confirm' that will take information from these fields and send it via email (Figure 2 shows the graphical controls with sample data).

Some webpage content is needed for this part of the assignment:

In order to make the webpage interactive JavaScript will be used to augment the webpage.

Pressing the 'confirm' button with the data shown in Figure 2 will run the email client configured for the webpage visitor's computer as shown in Figure 3.


Figure 3:

Documentation requirements, Part II:

Style requirements, Part II:

Page III: JavaScript implements a "times-table" multiplication program. In addition to getting marks for the working JavaScript functionality (described below) this part of the submission will be marked according to program-writing style and documentation requirements that you have been taught in lecture.

The JavaScript function automatically runs when your webpage is loaded into the browser. Except for some information in the html part of the webpage to automatically run the JavaScript function (when the content of the page is loaded into the browser) everything for this part of the assignment should be inside of a script tag. No other webpage content or html tags are needed. The program will calculate the multiplication times-tables for any two products from 1 - 12 using a pair of nested loops. You will need to be proficient writing programs employing branching (using ifs, else if etc.) and not only basic loops but also nested loops before starting this assignment. Also you must know the correct terminology inside and out. If the assignment specifications don't appear to make sense then it's probably because you don't properly understand a concept or term.

Built in mathematical functions of JavaScript cannot be used although of course you can and must use mathematical operators such as assignment and multiplication. Each product will be written to the webpage using the 'document.write()' method. To provide some readability each product must be followed by a space.  For example 1 x 6 yields: 1 2 3 4 5 6.

The products for each row should be a separate line. Example: 2 x 3: (1x1, 1x2, 1x3, 2x1, 2x2, 2x3):

         Columns ->

Rows     1 2 3
|||||||
vvvvvvv  2 4 6

 

 
Video 1: No data entry errors


 

 
Video 2: Repeated prompts and error messages

Documentation requirements, Part III:

Style requirements, Part III:

 

Submitting your work:

  1. The html documents for the three parts (and any local content such as images or videos) of the assignment must be electronically submitted according to the assignment submission requirements using D2L. (Again you must submit the web address of Part I in a Word document which also must be submitted via D2L).

D2L configuration for this course

  • You can (and really should) submit work as many times as you wish before the due date
  • Only your latest submission (what you submitted previously will be overwritten by your latest submission)
  • You can only submit one file per assignment. If you wish to submit multiple files (not really needed for this assignment) then use 'zip' to contain all the documents in one document: [How to use zip in Windows 7]. Do not use other compression utilities otherwise your submission may not be marked.
  1. You are not allowed to work in groups for this class. Copying the work of another student will be regarded as academic misconduct (cheating).  For additional details about what is and is not okay for this class please refer to the [notes on misconduct for this course].

Points to keep in mind:

  1. Due time: All assignments are due at 4 PM on the due dates listed on the course web page.  Late assignments or components of assignments will not be accepted for marking without approval for an extension beforehand. What you have submitted in D2L as of the due date is what will be marked.
  2. Extensions may be granted for reasonable cases by the course instructor with the receipt of the appropriate documentation (e.g., a doctor's note). Typical examples of reasonable cases for an extension include: illness or a death in the family. Cases where extensions will not be granted include situations that are typical of student life: having multiple due dates, work commitments etc. Tutorial instructors (TA's) will not be able to provide extension on their own and must receive permission from the course instructor first. (Note: Forgetting to hand your assignment or a component of your assignment in does not constitute a sufficient reason for handing your assignment late).
  3. Method of submission: You are to submit your assignment using D2L [help link]. Make sure that you [check the contents of your submitted files] (e.g., is the file okay or was it corrupted, is it the correct version etc.). It's your responsibility to do this! (Make sure that your submit your assignment with enough time before it comes due for you to do a check).
  4. Collaboration: Assignments must reflect individual work, group work is not allowed in this class nor can you copy the work of others. To avoid problems students should not see each others assignment solution.
  5. Execution: programs must work on the browsers in the 203 computer lab. It's up to you to test and check that this is the case. Non-functional submissions will receive only partial credit (if any at all).