Second JavaScript Assignment

Problem #1: Write HTML code with JavaScript to loop through the hours worked for five days of the week. Within the loop you should have a prompt to take in the hours for a day and add it to the total you are acccumulating. After the loop is done you should check the hours. If the hours are over 40 put out a message that says Overtime hours must be calculated otherwise put out a message saying OK. You should also display the total hours.

Problem #2: Write code that takes in orders for a particular product. You need to take in a reorder point outside a loop. Then within the loop you prompt for the number ordered and add it to a total. When the total is bigger than the reorder point the loop should end and you should display both the reorder point and the order total.

Problem #3: Write a program with a loop. After the loop has been executed the program should ask the user whether they want to do the processing in the loop again and act accordingly.

Problem #4: Write HTML code with JavaScript to handle and act on four different events.

Problem #5: Write a program to take in some information from boxes on a form and send the information to a function where you do something like set it up for display or do a calculation. The result should be displayed in a box on the form.

Problem #6: Take one of the beginning JavaScript problems and turn it into DOM style processing like the examples we covered in class (clearly you need to pick one that I did not modify).