DISC 3371 Parks Spring 2001 FINAL

1. (50 points) The server returns an XML string to the user in a single textarea named ta in a form named aform. In addition a button named go is provided following the text area. The XML string contains data for a single journal entry to be viewed by the user. This single journal entry contains: (1) a source reference number; (2) a fiscal month; (3) an account number (made up of two parts: major and minor); (4) an account description; and (5) a transaction amount. The beginning tags used in the XML string are: <JE>; <SRN>; <FM>; <MAJOR>; <MINOR>; <DESC>; and <TRANS-AMT>.

When the user presses the button named go, a sub named transform is called. This sub retrieves the XML string from the page and creates a new page on-the-fly. This new page presents the XML data in six textboxes in a six row-one column table. Present only the content value between the tag pairs in the textboxes -- do not show the tags. The six rows of the table contain: the source reference number; the fiscal month; major; minor; description; and transaction amount. The size of the text boxes for the XML data on the HTML page are: <SRN>=4; <FM>=2; <MAJOR>=4; <MINOR>=4; <DESC>=20; and <TRANS-AMT>=10. Do NOT name the textbox elements inside the HTML tags. Do NOT identify the textboxes in the table on the output page.

Write a function named createrow to: (1) find the value inside each tag pair; and (2) create each row's content for the table. This function will be referenced six times (once for each row in the table).

Show NO HTML. Show only the VBScript. Do NOT use XSL. Assume there are NO chr(13) or chr(10) contained in the XML string. Perform NO error checking.


Click here for the answer to this problem.

2. (50 points) Create a page (f0.htm) with three frames (f1.htm, f2.htm and f3.htm) with columns widths of 100, 30, and 300 pixels. The left frame contains two text boxes with size = 2 (the first is named T and the second is named L). It also contains a button named go. The middle frame contains a gif image ("onebyone.gif") that is one pixel high and one pixel wide. However, this image's size is to be stretched to produce a 200 pixel tall and 20 pixel wide image in the middle frame. The third column contains two gif images ("red.gif" and "blue.gif") that are initially positioned in vertical order (red above blue -- both at the left side top of the frame). Each of the two images in the third frame is 10 pixels by 10 pixels.

The result at load time is: a left frame with two text boxes and a button; a middle frame with a 200 by 20 pixel image; and a right frame with a red image above a blue image at the upper left of the frame.

When the user enters a values in the two text boxes in the first frame and the go button is pressed, the red and blue images in the third frame are moved. The red image is moved to the location specified by T (the distance from the frame's top) and L (the distance from the frames left side) values. The blue image is moved to a location which is: vertically 200 pixels minus T; and horizontally 200 pixels minus L.

If the user mouses over the image in the middle frame, the red box is repositioned at the upper left corner of the right frame and the blue image is aligned below the red image (just as in their initial positions). Additionally, the values of the T and L textboxes in the left frame are both set to zero.

Clearly label the HTML/script for each frame. Show the HTML and VBScript for ALL four pages. Note: there is no VBScript for f0.htm or f3.htm. Note: f3.htm does contain STYLE. Perform NO error checking (i.e., do NOT error check the values in T and L).


Click here for the answer to this problem.

The link above contains the top frameset (called f0.htm on the exam is at http://www.bauer.uh.edu/parks/s0171f2.htm):

<HTML>
<frameset cols="100,30,300" border="1">
<frame src="http://www.bauer.uh.edu/parks/s0171f21.htm" scrolling=no">
<frame src="http://www.bauer.uh.edu/parks/s0171f22.htm" scrolling=no">
<frame src="http://www.bauer.uh.edu/parks/s0171f23.htm" scrolling=no">
</frameset>
</HTML>

The src values for the frames are called f1.htm, f2.htm, f3.htm on the exam.