Assignment 1 CO957 2006 - Table Wizard
- Objectives:
- Experiment with CGI programming.
Submit a form.
- Create a static html document with a form. The form action will
be to submit the data to your perl program.
- The perl prgram will output an html table built based on the input
parameters sent to the program from your original html form.
- The html form will allow the user to define the number of rows and
columns (textboxes), table border (selection pull-down list), the
table background colour (radio buttons) and the type of dummy data to fill
in the table with (checkboxes).
- Provide four radio button for background colour: lightblue, yellow,
wheat and cyan.
- Provide three checkboxes for filler data, numbers, letters and strings. If
the user selects numbers they will get a randomly selected number from zero
to 10,000. If the user selects letters the table will be filled with a
randomly selected letter from the range A-Z. If the user selects strings as
the filler you will randomly select words from the unix dictionary as the
table filler. If the user selects more than one checkbox you will populate the
table with all of the items selected, randomly picking one format from the
list of three.
- Examples:
3 rows, 4 columns, lightblue, 2px border, numeric filler
|
568 | 830 | 27 | |
41 | 791 | 270 | |
936 | 13 | 135 | |
234 | 19 | 79 |
4 rows, 5 columns, yellow background, 2px border, letter filler
|
D | R | C | Y | Y | |
Q | N | U | M | J | |
C | Q | C | Q | K | |
O | S | B | Y | X |
3 rows, 6 columns, wheat background, 2px border, string filler
|
barefooted
| booze
| cashmere
| Barhop
| stoppers
| bituminous
| |
invalid
| brays
| desires
| despairs
| procrastinate
| McCarty
| |
Burgundy
| arbor
| shameful
| applicative
| hug
| straightway
|
5 rows, 4 columns, cyan background, 5px border, numbers and letters for filler
|
T | 0 | 781 | 191 | |
W | M | 347 | J | |
Z | 142 | 311 | Q | |
U | I | H | 802 | |
754 | V | S | 271 |
5 rows, 6 columns, wheat background, 10px border, numbers, letters and strings for filler
|
displeasing
| cellophane
| 14 | perpetuating
| Ultrix
| U | |
123 | disgust
| blitz
| E | 253 | 160 | |
mincing
| bayou
| treetop
| valuables
| 120 | 909 | |
651 | T | schedules
| 608 | I | D | |
W | 473 | tablecloths
| virtuously
| 306 | O |
- Use the CGI module installed on csunix (Read perldoc CGI). You may use the object
oreinted approach or the function based approach. Both allow you to very easily
generate html components using method or function calls. You will need to read the documentation to get examples of how to produce the html you want.
All the programs you write in this course will enable 'use warnings;'
and the 'use strict' pragma must also be in effect.
Approximately 25% of your mark is for documentation. Please include descriptive text in your program which explains to another programmer what you were thinking when you wrote the code.
Please read about documentation.
Every program you hand in must include a Statement of Authorship.
"I John Doe, 123456 certify that this material is my original work.
No other person's work has been used without suitable acknowledgment and I have not
made my work available to anyone else."
- Hand-in:
- Develop your solution on csunix in ~/public_html/cgi-bin/957a1.pl and ~/public_html/957a1.html
- When you are finished you must copy your files to this directory
~/public_html/Qweb_assign/collinw/a1/
- Name your program 957a1.pl and your form 957a1.html
- Deadline:
- Wednesday Oct. 4, during lab time.