WDV221 Intro Javascript
Skill Test - Form Calculations
Item Name:
Item Name cannot be blank
Item Price:
Item Price must be a number greater than zero
Number Purchased:
Number Purchased must be an integer greater than zero
Sale Price:
Total Sales:
Your Order So Far:
An example display:
Pens $3.25
Pens $9.90
Instructions: Modify this page so that the form works as described.
The customer making an order is allowed to enter a product name, price and quantity to be purchased.
When the customer submits the order the form will calculate the sale price and display it on the Sale Price line.
When the customer submits the order the form will add the product name and sale price to a list of products purchased and displayed on the form.
When the customer submits the order the form will add the Sale Price to the Total Sales value and display the new value on the form.
All dollar amounts should be formatted as US currency.
The Item Price field should be a number and should allow decimal values.
The Number Purchased field should be a number and should only allow whole numbers/integers.
The Reset button should clear the form fields and the Sale Price
The Clear Order button should clear the form fields, the Sale Price, reset the Total Sales to zero and clear the Order area.