use CGI;
$TITLE="Frameset Example";
# We use the path information to distinguish between calls
# to the script to:
# (1) create the frameset
# (2) create the query form
# (3) create the query response
# If no path information is provided, then we create
# a side-by-side frame set
if (!$path_info) {
exit 0;
}
# If we get here, then we either create the query form
# or we create the response.
# Create the frameset
sub print_frameset {
print <<EOF;
<html><head><title>$TITLE</title></head>
<frameset cols="50,50">
<frame src="$script_name/query" name="query">
<frame src="$script_name/response" name="response">
</frameset>
EOF
;
exit 0;
}
sub print_html_header {
}
sub print_end {
}
sub print_query {
print "<H1>Frameset Query</H1>\n";
print "<P>What's the combination?<P>",
print "<P>What's your favorite color? ",
"<P>";
}
sub print_response {
print "<H1>Frameset Result</H1>\n";
print "<b>No query submitted yet.</b>";
return;
}
}