Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / 5.8.0 / CGI / eg / internal_links.cgi
CommitLineData
86530b38
AT
1#!/usr/local/bin/perl
2
3use CGI;
4$query = new CGI;
5
6# We generate a regular HTML file containing a very long list
7# and a popup menu that does nothing except to show that we
8# don't lose the state information.
9print $query->header;
10print $query->start_html("Internal Links Example");
11print "<H1>Internal Links Example</H1>\n";
12print "Click <cite>Submit Query</cite> to create a state. Then scroll down and",
13 " click on any of the <cite>Jump to top</cite> links. This is not very exciting.";
14
15print "<A NAME=\"start\"></A>\n"; # an anchor point at the top
16
17# pick a default starting value;
18$query->param('amenu','FOO1') unless $query->param('amenu');
19
20print $query->startform;
21print $query->popup_menu('amenu',[('FOO1'..'FOO9')]);
22print $query->submit,$query->endform;
23
24# We create a long boring list for the purposes of illustration.
25$myself = $query->self_url;
26print "<OL>\n";
27for (1..100) {
28 print qq{<LI>List item #$_ <A HREF="$myself#start">Jump to top</A>\n};
29}
30print "</OL>\n";
31
32print $query->end_html;
33