Académique Documents
Professionnel Documents
Culture Documents
3 Total Marks: 20
Semester: FALL 2010
CS101 Introduction to Computing Due Date:
January 05, 2011
Instructions
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:
Objective
Notepad
You are required to Design HTML layout, validate form fields and manage fields style with
the help of JavaScript. (20 Marks)
1. Layout
If user will submit form without entering any value in GPA. Display warning message.
Change field background color to pink.
On clicking ok reset layout to initial state (White background, pointer focus on GPA field).
If user will submit form with value less than 1 and greater than 4. Display warning message.
Change field background color to light sky blue.
On clicking ok reset layout to initial state (White background, pointer focus on GPA field).
5. Validate Correct Numeric Value
If user will submit form with value > = 1 and < 2. Display message “Fair :: You got D grade”.
If user will submit form with value > = 2 and < 3. Display message “Good :: You got C grade”.
If user will submit form with value > = 3 and < 4. Display message “Very Good :: You got B grade ”.
If user will submit form with value equal to 4. Display message “Excellent :: You got A grade ”.
Hints:
1. For pink color use keyword pink.
2. For red color use keyword red.
3. For light sky blue color use keyword lightskyblue.
4. For lime color use keyword lime.
5. To change field background color use backgroundColor property of style sheet in JavaScript.
6. To set pointer focus on GPA field use JavaScript function focus.
Deadline:
Your assignment must be uploaded on or before January 05, 2011.
How to Create HTML File
3. Choose the location where you want to save your HTML file. Enter the name of
HTML file. Take care of starting and ending double quotes (“), these are
compulsory. Select “Save as type” field with value “All Files” and hit save.
HTML file is successfully created.