Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / 5.8.0 / CGI / eg / popup.cgi
CommitLineData
86530b38
AT
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;