Question
HTML/Javascript I have to create a user login. Attached above is the simple HTML code I made that sets up the login and I have
HTML/Javascript
I have to create a user login. Attached above is the simple HTML code I made that sets up the login and I have to make a login script in javascript. The login script has 2 functions that are called Validate and Verification.
Validate function:
INPUT: HTML Form that needs to be validated
PROCESS: Validates that all required information exists: Patron Name, Patron ID and Patron Email Address (if required). The Patron ID must also be an 8-digit numeric value and the Patron Email Address must contain an @ and a period. Alerts the user about invalid data and its location. If all input is valid, alerts the user as to whether or not the user is found within the system.
OUTPUT: Alert the user to correct the particular error in the appropriate box if necessary
Verification function:
INPUT: HTML Form with Patron Name and Patron ID
PROCESS: Compares the form's Patrons Name and Patron ID with the properties of a patron object stored in a global array of patrons (for this exercise create an array of 6 patrons). Returns true if it finds the patron object matches both.
OUPUT: Simple welcome message
I've been having a lot of trouble getting the javascript functions to work so I'd like to see what someone else does so I can correct mine. Please keep it as simple as possible. Any help greatly appreciated.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started