Summary: In this lab, we continue our investigations of CGI scripting.
This lab is optional. It is intended for students who complete the first CGI lab early.
a. Make copies of the following files:
b. Start DrScheme.
While we've been creating our HTML forms in a text editor, it is also possible to generate a form with a CGI script.
a. Look at
newgreeting.ss and see if you can figure out
what it does.
newgreeting.ss from within DrScheme and execute
greeting-page to see
that you understand what strings they generate.
c. Create a corresponding CGI file
don't create a corresponding HTML file. Load the CGI file in your browser
and see what happens.
d. Can you tell why we didn't have to create an HTML page for
Write a CGI script that takes a number as input and produces the square
root of that number as output. Since CGI variables are passed as strings,
you will probably want to use the
number->string procedurese to convert to and from numbers.
a. Look at
colorful.ss and see if you can determine what it
colorful.cgi, a CGI file that loads
colorful.cgi through your Web browser and try
entering different colors to see what happends.
d. What happens when you select the color
yellow? Why? Fix
the problem you've found in this step.
colorful.ss so that it supports more than those
colorful.ss so that it takes both a background
color and a foreground color.
Tuesday, 11 February 2003 [Samuel A. Rebelsky]
I usually create these pages
on the fly, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Tue May 6 09:28:59 2003.
The source to the document was last modified on Tue Feb 11 12:53:32 2003.
This document may be found at