| 1. (50 points) The form (named f1) to the left contains a textarea named d1 which is string of XML.
The DTD for this XML is:
<?xml version="1.0"?> This data (from www.county.org) shows the total property tax rates for each Texas county for the years 1998 through 2013. Assume the following code exists in the javascript function p1 that loads the string of XML shown to the left into the Microsoft XMLDOM (DO NOT write this code):
(column 1) name; (columns 2 through 17) county tax rate [there are 16 rates for each county 1998 thru 2013]; (column 18) maximum of this county's rates (of the 16 values for the county) 2. Place the resulting table in the DIV with id="p1_out". 3. After the table show: the maximum county tax rate (i.e., the maximum value in column 18) and the county name where this occurred. Notes: the value for any table cell (except column 18) is: root.childNodes[i].childNodes[j].text; the number of counties is: root.childNodes.length (there are 255 counties); the number of values for each county is: root.childNodes[i].childNodes.length. Show NO HTML. Show NO heading. Show only the javascript for p1(). | |
This is DIV with id="p1_out"
|
2. (50 points) The 50 most frequently words occurring in our course syllabus are stored in alphabetical order in an array named w. The corresponding frequencies of these 50 words are stored in an array named wc.
There is also an array named clr that contains 8 CSS color names. Assume these three arrays are in available in the javascript function p2.
Find the max and min frequency in wc -- named them: cmax and cmin.
Show NO HTML. Show only the javascript for p2().
|