Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | #!/usr/local/bin/perl |
2 | ||
3 | use 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. | |
9 | print $query->header; | |
10 | print $query->start_html("Internal Links Example"); | |
11 | print "<H1>Internal Links Example</H1>\n"; | |
12 | print "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 | ||
15 | print "<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 | ||
20 | print $query->startform; | |
21 | print $query->popup_menu('amenu',[('FOO1'..'FOO9')]); | |
22 | print $query->submit,$query->endform; | |
23 | ||
24 | # We create a long boring list for the purposes of illustration. | |
25 | $myself = $query->self_url; | |
26 | print "<OL>\n"; | |
27 | for (1..100) { | |
28 | print qq{<LI>List item #$_ <A HREF="$myself#start">Jump to top</A>\n}; | |
29 | } | |
30 | print "</OL>\n"; | |
31 | ||
32 | print $query->end_html; | |
33 |