Weighted Decision Matrix

Scope of Work

Create a JavaScript-powered web form that will allow a user to enter input into two tables that populate values in a third table.

Deliverables

An HTML file with the tables' scaffolding is included in the lab folder. Write your script in a main.js file and reference the script from the html file included. Zip both files together. Remember to ensure the directory reflected in the script tag matches the actual path to the file within the zipped folder.

Save the zipped folder as yourlastname_yourfirstname_module02lab.html.

Requirements

Add ids and classes to the elements in the included file as needed.

The theme of the table is up to you, but it should be something that you can compare. An example, included in the video in the advice section, is comparing breeds of dogs using quantitative metrics. Other themes could be flavors of ice cream, video game equipment, or cars. Whatever you decide on, you must update the column and row headers to reflect this choice in the html file. You DO NOT need to do this programmatically.

The submit button should populate the results table with calculated values. You should check that there is a value in each table cell before performing the calculation and alert the user if there is anything missing using a window alert.

In the results table, for each user, their highest scoring item should be highlighted in green. Their lowest scoring item should be highlighted in red.

Advice

Make sure to use the appropriate selectors. Specificity matters here and a lack of specific selectors will create problems for you as you move through this lab.

You should never utilize an id for multiple elements. Ids should always be unique. If you are using an id for multiple elements, you either need to use a class or rethink what you are doing altogether.

Watch this video to learn how the math and methodology for this works: Tarnoff - Matrix Multiplication

Resources

HTML Template
Code

Example

Burke's Weighted Decision Matrix