
Common Gateway Interface (CGI) programming involves peculiar flows of control and
data. Follow the solid black arrows to trace the flow of control from programs to documents to programs to documents as the Web BOMB works. Follow the red, numbered circles to trace the flow of the three items of data -- the article's issue
(1)
, section
(2)
, and title
(3)
-- that make the Web BOMB context-sensitive.
E.
Widgets that the HTML forms language supports include radio buttons, check boxes, single-line text boxes, multiline text boxes, drop-down listboxes, and command buttons. Of these, the Web BOMB uses only three: radio buttons for the multiple-choice questions, a multiline text box (not visible here) for the free comments, and command buttons (not visible here) to send or reset the form.
Be sure, as always, to check the look of your form in a variety of browsers. This layout, with vertical bars separating the choices, looks fine in Netscape, but not so hot in Mosaic.
F.
I found the
NT version of Perl 4 that I'm using here on Process Software's ftp site, ftp.process.com. The CGI library, cgi-lib.pl, is there, too.
Intergraph originally ported Perl to NT, so you can also find NT Perl stuff at ftp.intergraph.com.
G.
In the Web/CGI environment, it's easy to return the user to a form that hasn't been completely or correctly filled in. Just tell the user to go back -- something all browsers can do. No programming required here!
H.
I could have fed the results into a live database back end, but that wouldn't have been as easy, as modular, or as portable.
This solution creates a file for each comment record. Off-line, I can scoop up the comments, turn them into a database import file, and run SQL queries on them.
I.
Here's where the original article's URL, obtained from the HTTP_REFERER variable, finally gets put to use. Clicking on it returns the user directly to the original article.
 
|