6 $TITLE="Frameset Example";
8 # We use the path information to distinguish between calls
10 # (1) create the frameset
11 # (2) create the query form
12 # (3) create the query response
14 $path_info = $query->path_info;
16 # If no path information is provided, then we create
17 # a side-by-side frame set
23 # If we get here, then we either create the query form
24 # or we create the response.
26 &print_query if $path_info=~/query/;
27 &print_response if $path_info=~/response/;
33 $script_name = $query->script_name;
35 <html><head><title>$TITLE</title></head>
36 <frameset cols="50,50">
37 <frame src="$script_name/query" name="query">
38 <frame src="$script_name/response" name="response">
45 sub print_html_header {
46 print $query->start_html($TITLE);
50 print qq{<P><hr><A HREF="../index.html" TARGET="_top">More Examples</A>};
51 print $query->end_html;
55 $script_name = $query->script_name;
56 print "<H1>Frameset Query</H1>\n";
57 print $query->startform(-action=>"$script_name/response",-TARGET=>"response");
58 print "What's your name? ",$query->textfield('name');
59 print "<P>What's the combination?<P>",
60 $query->checkbox_group(-name=>'words',
61 -values=>['eenie','meenie','minie','moe']);
63 print "<P>What's your favorite color? ",
64 $query->popup_menu(-name=>'color',
65 -values=>['red','green','blue','chartreuse']),
68 print $query->endform;
72 print "<H1>Frameset Result</H1>\n";
73 unless ($query->param) {
74 print "<b>No query submitted yet.</b>";
77 print "Your name is <EM>",$query->param(name),"</EM>\n";
78 print "<P>The keywords are: <EM>",join(", ",$query->param(words)),"</EM>\n";
79 print "<P>Your favorite color is <EM>",$query->param(color),"</EM>\n";