You are required to Design HTML layout, validate form fields and manage fields style with the help of JavaScript. (20 Marks)
1. Layout
2. Validate Empty Field
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).
3. Validate Alphabetic Value
If user will submit form with alphabetic value. Display warning message.
Change field background color to red.
On clicking ok reset layout to initial state (White background, pointer focus on GPA field).
4. Validate Range of Value
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 ”.
Change field background color to lime.
6. Validate Find Grades Button
If value is > = 1 and <= 4, on clicking ok jump to www.vu.edu.pk
For any other value or empty field must not jump to www.vu.edu.pk
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
1. Create new text file and write your code in it.
2. Save the file as given in image
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.
.................................................
SOLUTION:
YOUR STUDENT ID :: Assignment NUMBER
Wanna Code? click here or send a blank email to our email ID "virtual.uni.help3@gmail.com" our server send u solution within 2 seconds.
Bottom of Form
............................