User Tools

Site Tools


eg-259:homework:11

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
eg-259:homework:11 [2011/01/14 13:00] – external edit 127.0.0.1eg-259:homework:11 [2012/02/17 15:59] (current) eechris
Line 1: Line 1:
 ====== JavaScript and HTML Documents: part 2 ====== ====== JavaScript and HTML Documents: part 2 ======
  
-**Adapted from**: Robert W. Sebasta, Programming the World-Wide Web, 3rd Edition, Addison Wesley, 2006. **Supporting**: [[eg-259:lecture9|Lecture 9]]. +**Adapted from**: Robert W. Sebasta, Programming the World-Wide Web, 3rd Edition, Addison Wesley, 2006. **Supporting**: [[eg-259:lecture9|Contact Hour 13]]. 
  
   - Rewrite the document for the exercises of the [[eg-259:homework:10|previous lecture]] to use the DOM 2 event model.   - Rewrite the document for the exercises of the [[eg-259:homework:10|previous lecture]] to use the DOM 2 event model.
-  - Develop, test, and validate an XHTML document that has check boxes for apple (59p each), orange (49p each), and banana (39p each), along with a submit button. Each of the check boxes should have its own ''onclick'' event handler. These handlers must add the cost of their fruit to the total cost. An event handler for the //Submit// button must produce an alert window with the message ''%%"%%Your total cost is //xxx// p,%%"%%'' where ''//xxx//'' is the total cost of the chosen fruit plus 17.5 percent VAT. This handler must return ''false'' (to avoid actual submission of the form data). +  - Develop, test, and validate an HTML document that has check boxes for apple (59p each), orange (49p each), and banana (39p each), along with a submit button. Each of the check boxes should have its own ''onclick'' event handler. These handlers must add the cost of their fruit to the total cost. An event handler for the //Submit// button must produce an alert window with the message ''%%"%%Your total cost is //xxx// p,%%"%%'' where ''//xxx//'' is the total cost of the chosen fruit plus 17.5 percent VAT. This handler must return ''false'' (to avoid actual submission of the form data). 
-  - Develop, test, and validate an XHTML document that is similar to that of Exercise 2. In this case, use text boxes rather than check boxes. These text boxes take a number, which is the purchased number of the particular fruit. The rest of the document should behave exactly like that of Exercise 2.+  - Develop, test, and validate an HTML document that is similar to that of Exercise 2. In this case, use text boxes rather than check boxes. These text boxes take a number, which is the purchased number of the particular fruit. The rest of the document should behave exactly like that of Exercise 2.
   - Add reality checks to the text boxes of the document in Exercise 3. The checks on the check box inputs should ensure that the input values are numbers in the range 0-99.   - Add reality checks to the text boxes of the document in Exercise 3. The checks on the check box inputs should ensure that the input values are numbers in the range 0-99.
   - Revise the document of Exercise 3 to use the DOM 2 event model.   - Revise the document of Exercise 3 to use the DOM 2 event model.
eg-259/homework/11.1295010031.txt.gz · Last modified: 2012/02/17 15:59 (external edit)