1. (50 points) The server sends an HTML page that contains a form named showform. The form contains elements in the following order:
If the user_code begins the the letter "S", the user will receive a special 10% discount on any call with a billing amount greater than or equal to $20.00. The user is directed to enter their user_code and then press the "Show my Total Bill" button. The function show_bill first compares user_code to actual. If they match, then the function produces a new HTML page that shows:
2. (50 points) An HTML page is loaded that contains a form named vform. This form contains a single textbox named n and a button with the word "GO." The user is directed to enter a single integer that is greater than or equal to 5 and less than 21. When the user presses the "GO" button, a sub named fred is called. This sub produces a table with n rows and n columns with a one-pixel border.
|
Along the diagonal (the diagonal from the upper left cell to the lower right), cells contain the values 1 through n.
The space below each diagonal cell (except the last one) contains a single cell that spans the remainder of the column space (i.e., all the remaining rows). This spanning cell has: a background color of light gray ("#999999"); and has the integer from the diagonal cell above centered vertically in the space. The space to the right of each a diagonal cell (except the last one) has a single cell that spans the reminder of the row space (i.e., all the remaining columns). The spanning cell has: a background color of medium gray ("#666666"); the integer from the row's diagonal cell centered horizontally in the space; and a white font color. |
An example of the output is shown above for n=6. If the user enters a value greater than 20, the program sets n to 20. If the user enters a value less than 5, the program sets n to 5. Do not test the user's input for numeric. Show only the VBScript code for fred.
CAUTION: rowspan="0" and colspan="0" are both ignored by the browser. If a cell has rowspan="0" the rowspan attribute is ignored and the cell is displayed anyway. If a cell has colspan="0" the colspan attribute is ignored and the cell is displayed.