Javascript: Case Study To Be Used For Lecture Sessions
Javascript: Case Study To Be Used For Lecture Sessions
2
Icons Used
Hands on
Questions Tools Exercise
Coding Test Your
Reference
Standards Understanding
A Welcome
Try it Out Contacts
Break
3
Case Study Overview
Introduction:
This case study is about the design of an online
application form for a Credit Card.
It applies the concepts of Java Script for Client Side
Validation. It also covers the usage of DOM Model and
Event Handling mechanism of Java Script.
4
Case Study – Credit Card Registration
Form
User will get a form to register for once, as he
log on to the Credit Card Portal for Registration.
Registration Form will have the following details
to be filled by the User:
» First Name
» Last Name
» Address
» Email id
» City
» State
» Phone number
5
Case Study – Credit Card Registration
Form (Contd.)
Form has a submit button to submit the details.
After submit the details the following validations
have to done before sending data to the server.
6
Case Study – Credit Card Registration
Form (Contd.)
1. First Name or Last Name: It should contain
only letters, special symbols, and numbers are
not allowed. When user enters any special symbol
or a number, user should immediately get an
alert message "special chars and numbers are not
allowed". The maximum length of the name in
each of these fields should not exceed 25 chars.
7
Case Study – Credit Card Registration
Form (Contd.)
2. Address: Maximum number of chars allowed
should be 50 chars.
3. Email id: It should be of the format
[email protected]
4. City and State: State and cities are two
dropdown list boxes, when user selects the state
the city drop down should get updated as respect
to state.
5. Phone number: Should contain only numbers
and the maximum length is 11.
Case Study – Credit Card Registration
Form (Contd.)
6. "Thank you for submitting your information, we
will get back to you shortly“. Finally provide a
submit button on the page. When the button
is clicked, there should be a layer that pops up
and it contains the following message.
11
Source
W3Schools.com
Disclaimer: Parts of the content of this course is based on the materials available from the Web sites and
books listed above. The materials that can be accessed from linked sites are not maintained by
Cognizant Academy and we are not responsible for the contents thereof. All trademarks, service marks,
and trade names in this course are the marks of the respective owner(s).
12
You have completed the
Case Study for Lecture
Session of JavaScript.