source: for-distributions/trunk/bin/windows/perl/lib/CGI/eg/internal_links.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: 1018 bytes
Line 
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
Note: See TracBrowser for help on using the repository browser.