CS222 Web Programming Assignment 6


Instructor: Trish Cornez





Web Application

Distance runners need to pace themselves to avoid burning out before the end of a long race. Create a webpage that lists the time the runner should reach for each mile marker for a given distance and target pace. The site will look similar to the images below. Note that time is formatted with leading zeros where a single digit value occurs.
  1. Create a runner's pace chart based on entered values for distance and target pace.
  2. The HTML consists of fields for entering a distance (in miles) and target pace (in minutes per mile), as well as a table for the pace chart.
  3. Initially the table contains only a header row with the column names, and no data; as such, you should hide the table as soon as the page is loaded.
  4. When the user clicks the Calculate button, calculate and populate the table with data representing the mile and the time target for each mile. Remember to store minutes, seconds, and hours using exactly two digits. If only one digit is needed, apply a leading zero to it.
  5. Use each row of the table to store the mile number and the time at which the runner should reach that mile - each in its own table cell.