MMDT1022 HTML II and Javascript
Week 2


Week 2

Instructor will explain scope of variables.  Two levels, Global and Local scope.

Standard BINGO example.

Buzzwords BINGO example.


Lab Multiplication Table

Here is an example of using a for loop to create a multiplication table.

This is the partially finished lab called multtable. (Password protected. Only viewable live and in the recording)

Here is the finished version that asks for the table size called multtable. (Password protected.)

snapshot

Part 1 - Using for loops, create a multiplication table. Prompt for the number of rows and the number of columns. Generate a HTML table on the fly as to create a nice looking table with alternating colored rows.

Part 2 - Create an event handler function so that when you click on a cell, the cell background color changes.

Part 3 - Create an event handler function so that when your mouse leaves the selected cell, the background color changes back to the original color and the text changes back to say "Pick a square".

Part 4- Generate a message that shows which row and column was selected and what data the cell contained.

Part 5 - Fix the user input so that a error message is displayed if the user does not enter integer values between 1 - 12 for both row and column. Error message should display if characters are entered.

Grading Criteria Points
25
Part 1 5
Part 2 5
Part 3 5
Part 4 5
Part 5 5

Assignment is due one week from when it was assigned.  50% penalty if late.