Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROG1935 Instructions HTML Requirements Collect the users name, email address, and credit card information to generate an estimate. Make sure there are at least five

PROG1935

Instructions

HTML Requirements

Collect the users name, email address, and credit card information to generate an estimate.

Make sure there are at least five items available for sale.

JavaScript Requirements

All JavaScript code must be located in an external script file.

The following user inputs must be validated

2 Mandatory fields name and email address.

Fields with a specific format

Credit Card in format xxxx-xxxx-xxxx-xxxx, eg: 4111-1111-1111-1111

Credit Card Expiry Month in the format: MMM, e.g., NOV

Credit Card Expiry Year in the format: yyyy, e.g., 2021

At least one item should be bought, and the value customer enters in the item quantity input boxes should be a number. Do not use input type numbers in HTML. You must validate using JavaScript.

As a part of the fundraiser, the customer must donate $10 or 10% of the total price of the items they buy, whichever is higher. Automatically calculate the donation amount based on the total purchase.

If any errors exist, display all the error messages on the web page. Do not use a JavaScript popup box for this purpose or show only one error at a time.

Generate a receipt to give to the customer. Show only the last four digits of the credit card along with the rest of the information like name, email, products, quantity, total cost, donation amount, etc.

image text in transcribed

image text in transcribed

Conestoga Garage Sale Raising money for The Frontline Fund Name Email Credit Card Number Credit Card Expiry Month Credit Card Expiry Year Buy generously Number of Water Bottles (\$5) Number of Caps (\$20) Number of Pens (\$2) Number of Candy Bags ($10) Conestoga Garage Sale Raising money for The Frontline Fund

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions