MS - CSc 6370

Web Programming

GSU

More info:

Click throught the assignments to view contents




Valid XHTML 1.0 Strict



Instructions

Assignment 2 (due September 17, 2008)
1. Solve problem 6.4 on page 306 in Dr. Sunderraman's text:
Consider a Web page that displays a data collection from with the following elements:
* A text box for first name - begins with an uppercase letter.
* A text box for last name - begins with an uppercase letter.
* A text box for phone number - in the format (404) 555-5555.
* Six checkboxes for hobbies: hockey, travel, chess, coin collecting, stamp collecting, and shopping.
A maximum of three can be checked.
* A text box for email address - format email@hostname.domain.suffix. Each of the components can be a string that begins with a lowercase and contains only lowercase letters, digits, and the special characters hyphen (-) and underscore (_).
* A submit button.
Write HTML and Javascript code that validates all the data according to the constrains imposed on them. The validation should happen as soon as the user enters some text and leaves a text box or as soon as a checkbox is checked. The validation should also be performed when the submit button is clicked.
2. Solve problem 6.4 on page 263 in Sebesta text:
The document must have a paragraph of text that describes your home. Choose at least three different phrases (three to six words) of this paragraph and make them change font, font style, color, and font size when the mouse cursor is placed over them.
3. Solve problem 6.5 on page 307 in Dr. Sunderraman's text:
Consider a dynamic Web page to collect data from students. Initially, the Web page consists of text boxes for last name, first name, and email, as well as a set of three radio buttons labeled with the values BS, Ms, and PhD. The radio button group is titled "Degree." Upon choosing one of the three possibilities for the degree, a different set of form elements is displayed for each of the degrees as described below:
* For the BS degree, a select list of major concentrations (Database, Networks, Systems, Bioinformatics, and Theory), a select list of minor concentrations (Database, Networks, Systems, Bioinformatics, and Theory), and two radio buttons labeled "Yes" and "No" with a group title "Honors Program?" should be displayed. The student should not choose the same concentration for both major and minor.
* For the MS degree, a text box for the advisor name and a radio button group of two radio buttons labeled "Project" or "Thesis" should be displayed. If "Project" is chosen, an additional text box for committee member should be displayed, and if "Thesis" is chosen, two additional text boxes for committee members should be displayed.
* For the PhD degree, a text box for the advisor name and three additional text boxes for committee members should be displayed. Write HTML and Javascript code to display the dynamic Web page described above. Include basic validation checks that report errors on empty input on any of the elements when data is submitted.

Answers

ml>