WDV221 Intro Javascript
Skill Test - Form Calculations
Sale Price for this purchase:
Total Sales for all purchases:
Instructions: Modify this page so that the form works as described.
- The customer will select the product and the product price using the drop down list.
- The Number Purchased field should be a number and should only allow whole numbers.
- When the customer submits the order, calculate the Sale Price (product price * number purchased) and display it on the Sale Price line.
- When the customer submits the order, the form will add the 'salePrice' to the Total Sales value and display the new value on the Total Purchases line.
- All dollar amounts should be formatted as US currency.
- The Reset button should clear the form fields and the 'salePrice' field.
- The Clear Order button should clear the form fields, the 'salePrice', the 'totalSales' and start a new Total Sales.