DISC 3371 Final | Full Name____________________________________________________________ |
Parks Fall 2004 | Userid: TMP____________ Last 4 SSN_________________ |
|
1. (50 points) Assume a page contains a frameset composed of two columns. The right frame contains only a DIV block with id="fr". The left frame contains the menu as shown in the gray area to the left and a vbscript sub named p1. The menu contains three links:
the 1st link ("Show All...") contains onClick="p1(1)"; the 2nd link ("Show...With Pics") contains onClick="p1(2)"; the 3rd link ("Show All...String") contains onClick="p1(3)". The textbox is named w in a form named pform. |
|
|
When the user clicks a link, the sub p1 displays a table in the right frame. If the user clicks:
|
|
2. (50 points) Assume there is a fourth link on the menu described above. The link (shown to the left) would contain onClick="pxml()". You are to write the javascript function pxml that takes the data contained in the global array p (shown below to the left) and displays an XML representation of the data in the right frame. | |
|
Make up your own tag names. There should be: one set of outside tags; an outside tag pair for each person that contains the seven detail tags with the appropriate content.
(Note: in order to display the tags correctly in HTML you must use "<" instead of "<" and ">" instead of ">")
This task will require the javascript function pxml to perform the string splitting processs the same way as the one described above to break the person's string up into seven different pieces. You can either: write an additional function (call it jsplitter if you do) or you can perform the splitting task in pxml. Write only the javascript for pxml (and jsplitter if you use a javascript function). |