2012 ip assignment3

2
Name: Student ID: Assignment 3 Java Script Validation Deadline: November 5 Create an HTML form that has the following features 1. First Name: This is a text box. a. first name should not be empty b. First name must start with an alphabet c. No numbers in the first name d. Maximum length of first name is 25 2. Last Name: This is a text box a. Last name should not be empty b. Last name must start with an alphabet c. No numbers in the First name d. Maximum length of First name is 25 3. Street Address : This is a text box a. Street Address should not be empty b. Maximum length of Street Address is 45 4. Province : This is a drop down box a. User must select one of the values in the drop down box b. Your drop down box should have only the following Province i. Busan ii. Chungcheongbuk-do iii. ChungCheongnam-do iv. Daegu v. Daejeon vi. Gangwon-do vii. Gwangju viii. Gyeonggi-do ix. Gyeongsangnam-do x. Gyeongsangbuk-do xi. Incheon xii. Seo-gu xiii. Jeollabuk-do xiv. Jeollanam-do xv. Sejong xvi. Seoul xvii. Ulsan c. After user selects a province, create a new drop down box, called as city. Populate this drop down box by adding at least 1 city for each state. For Ex: if a user selects Gyeonggi-do, then the city drop down box could contain Hwaseong-Si, Suwon-Si, etc. But, if a user selects Seoul, then the city drop down box could contain Seoul only.

Upload: h-k

Post on 15-Dec-2014

436 views

Category:

Documents


1 download

DESCRIPTION

Javascript validation assignment 2012.

TRANSCRIPT

Page 1: 2012 ip assignment3

Name:Student ID:

Assignment 3Java Script Validation

Deadline: November 5

Create an HTML form that has the following features1. First Name: This is a text box.

a. first name should not be emptyb. First name must start with an alphabetc. No numbers in the first named. Maximum length of first name is 25

2. Last Name: This is a text boxa. Last name should not be emptyb. Last name must start with an alphabetc. No numbers in the First named. Maximum length of First name is 25

3. Street Address : This is a text boxa. Street Address should not be emptyb. Maximum length of Street Address is 45

4. Province : This is a drop down boxa. User must select one of the values in the drop down boxb. Your drop down box should have only the following Province

i. Busanii. Chungcheongbuk-do

iii. ChungCheongnam-doiv. Daeguv. Daejeon

vi. Gangwon-dovii. Gwangju

viii. Gyeonggi-doix. Gyeongsangnam-dox. Gyeongsangbuk-do

xi. Incheonxii. Seo-gu

xiii. Jeollabuk-doxiv. Jeollanam-doxv. Sejong

xvi. Seoulxvii. Ulsan

c. After user selects a province, create a new drop down box, called as city. Populate this drop down box by adding at least 1 city for each state. For Ex: if a user selects Gyeonggi-do, then the city drop down box could contain Hwaseong-Si, Suwon-Si, etc. But, if a user selects Seoul, then the city drop down box could contain Seoul only.

5. City: This is a drop down box, which is created dynamically after user selects one of the province in the previous step.

a. User must select one of the values in the drop down box.

6. Zip Code: This is a text boxa. User must input the zip code.b. It must consist of only numbers with only one dash (-).

Page 2: 2012 ip assignment3

7. Date of Birth: This is a text box. a. User must input the date of birth.b. Date of birth should not be later than today’s datec. Date of birth should not be less than 100 years from now.d. The date of birth must follow the following format: mm/dd/yyyy. If a user doesn’t follow the format,

show an error message.e. Month, mm, should be a number between 1 and 12.f. Day, dd, should be a number between 1 and 31.

8. Type of Membership: This is a group of radio button: student, academic professional, and Industry professional.a. User must select one of the options.

9. Student members should enter the following informationa. Current Status (radio buttons : senior, junior, sophomore, freshman)b. Semester Credit Load (How many credits is the student taking in this semester) – this is a text box

i. It must be a number ii. It should not be empty.

This assignment will be graded as follows:1. Are all the validations implemented? - This is the minimum that I expect.2. Presentation – this involves use of colors, positioning the elements, good use of browser space. You can show

your CSS skills here.