Money Magazine's 2012 Top 100 Places Work | 1. (50 points) The textarea (named tp) shown to the left contains data on the "2012 Top 100 Places to Work" in a form named f1. The textarea has 100 companies each with the following data: (a) ranking (from 1 to 100) followed by a semicolon; (b) company name followed by a semicolon; (c) annual % growth followed by a semicolon; (d) number of employees followed by a "*" (except the last one) When this button is clicked a vbscript sub named p1 is executed. This sub:
This is the DIV block with id="p1_out"
|
Write only the vbscript for p1. Show NO HTML. The data is from: http://money.cnn.com/magazines/fortune/best-companies/2012/full_list/ |
2. (50 points) The entire text of Franz Kafka's 1915 story
"Metamorphosis" is stored in a textarea named ta2 in a form named f2 (as partially shown to the left). Each line of text contains: a number (an integer followed by a period and a space); then the string of text; and then a "*" at the end of the line (except the last line). A textbox for the user to enter a search string is shown below the textarea. This textbox is named sf and contains the text the user wishes to find in the body of the story. When button labelled "SEARCH" is clicked:
| |
Story from the Guttenberg Project: http://www.gutenberg.org/ebooks/5200 Notes: Only highlight the FIRST occurence of the sf value in each row. Disregard all others in the row. (i.e., don't search for more one occurence of sf). Assume the search is case-sensitive. Show only the javascript for p2. Show NO HTML. |