The html issued by program
with a button
When the user presses that button, program
(which is mentioned in the
action of the
The following input string is made available to the program:
(the *** stay for the user inputs)
- Receive the input string (subprocedure zhbGetInput)
- Parse the input string into program variables (subprocedure zhbGetVar)
- Load skeleton output html member
in CGIDEV2/DEMOHTML (subprocedure GetHtml)
- Get server's protocol
for later html output display (subprocedure getEnv)
- Set html output variables
and write out html output section top (the first part of the html script)
using subprocedure wrtSection
- for the <FORM>s hidden input fields
related to the background color and the national
- for the HTML <BODY parameters>
- for the user-specified search criteria
- If the first time through,
override and open database file
containing the boats catalog.
Note that this file is never closed,
in order to provide the best performance.
- Position the file to the next boat not yet listed
(input field boatnbr
is used for that).
This input field contains 0 when the program is called
through the html output from
BOATSCH0. On the other site, when the program
is called by pressing the button
Show nnn more, this input field contains
the serial number of the last boat listed.
- Read the database file
to find how many boats match the search criteria.
Write the html output section howmany
and, if more than 30 boats matching, the html output session
- Write the html output section tablestr
which defines the start of a html table
- Set again at the starting database record and read through
until maximum 30 boats matching the search criteria
For each such record, set the variables, and write html output section
tablerow showing boat length, make, type, year built,
price, and city where located.
However, this table row is not that simple,
as it carries information able to activate CGI program
the one that displays boat detailed information
along with images and boat dependent html text.
- It contains a link to program
along with a string that this program should receive in order
to show a single boat. The link, before variable substitution, is
will be replaced by the serial number of the boat
- It also contains the following checkbox
<input type="checkbox" name="serno" value="/%bnbr%/">
When the user presses the button
Show these vessels,
(mentioned in the
will be invoked and will receive a string
containing both the hidden fields
(such as national language and background color)
and the values of the checkboxes checked-in.
As an example, the input string could be
if the user selected three boats.
- When no more matches, or 30 matches found, write html output section
tablend which ends the html table
- If at least one row in the table, write html output section
foundsome containing the submit button
Show these vessels. Please note that the action of this submit button
(call program BOATSCH2) is defined
up in the output skeleton html
- If more than 30 matches found, write html output section
showmore which allows to relink to program
BOATSCH1 passing the same values for search criteria
along with the boat number it should start from
- Finally, the program would
- write html section endhtml
(after setting its output variables, including
the response time)
- send the html output buffer (by writing the
pseudo section *fini
- return leaving the LR indicator off,
to provide more performance the next time it is called.