Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Add script to this program so that when a button is clicked, a script will perform validation tests. 1. Test the experation date for validity

Add script to this program so that when a button is clicked, a script will perform validation tests.

1. Test the experation date for validity (i.e. expires after current date).

2. Test the digits entered in the card number field to see whether they are valid for the type of credit card selected.

* Visa card numbers always begin with the number 4 and use 16 digits.

* Mastercard numbers always begin with 5 and use 16 digits

*American Express card numbers always begin with the number 3 and use 15 digits.

3. If the card numbers are inccorrect based on the card type selected, ask the user to either select a different credit card type or change the card number. If the number of digits corresponds correctly, acknowledge that.

Lesson 7 Application Project

CIW JavaScript Specialist


Visa

MasterCard

American Express

Card #

Exp Date:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Handbook Of Database Security Applications And Trends

Authors: Michael Gertz, Sushil Jajodia

1st Edition

1441943056, 978-1441943057

More Books

Students also viewed these Databases questions

Question

7. What decisions would you make as the city manager?

Answered: 1 week ago

Question

8. How would you explain your decisions to the city council?

Answered: 1 week ago