source: for-distributions/trunk/bin/windows/perl/lib/CGI/eg/popup.cgi@ 14489

Last change on this file since 14489 was 14489, checked in by oranfry, 17 years ago

upgrading to perl 5.8

File size: 1023 bytes
Line 
1#!/usr/local/bin/perl
2
3use CGI;
4$query = new CGI;
5print $query->header;
6print $query->start_html('Popup Window');
7
8
9if (!$query->param) {
10 print "<H1>Ask your Question</H1>\n";
11 print $query->startform(-target=>'_new');
12 print "What's your name? ",$query->textfield('name');
13 print "<P>What's the combination?<P>",
14 $query->checkbox_group(-name=>'words',
15 -values=>['eenie','meenie','minie','moe'],
16 -defaults=>['eenie','moe']);
17
18 print "<P>What's your favorite color? ",
19 $query->popup_menu(-name=>'color',
20 -values=>['red','green','blue','chartreuse']),
21 "<P>";
22 print $query->submit;
23 print $query->endform;
24
25} else {
26 print "<H1>And the Answer is...</H1>\n";
27 print "Your name is <EM>",$query->param(name),"</EM>\n";
28 print "<P>The keywords are: <EM>",join(", ",$query->param(words)),"</EM>\n";
29 print "<P>Your favorite color is <EM>",$query->param(color),"</EM>\n";
30}
31print qq{<P><A HREF="cgi_docs.html">Go to the documentation</A>};
32print $query->end_html;
Note: See TracBrowser for help on using the repository browser.