Upgrade to CGI.pm-3.48
[perl.git] / cpan / CGI / examples / clickable_image.cgi
1 #!/usr/local/bin/perl
2
3 use CGI;
4 $query = new CGI;
5 print $query->header;
6 print $query->start_html("A Clickable Image");
7 print <<END;
8 <H1>A Clickable Image</H1>
9 </A>
10 END
11 print "Sorry, this isn't very exciting!\n";
12
13 print $query->start_form;
14 print $query->image_button('picture',"./wilogo.gif");
15 print "Give me a: ",$query->popup_menu('letter',['A','B','C','D','E','W']),"\n"; # 
16 print "<P>Magnification: ",$query->radio_group('magnification',['1X','2X','4X','20X']),"\n";
17 print "<HR>\n";
18
19 if ($query->param) {
20     print "<P>Magnification, <EM>",$query->param('magnification'),"</EM>\n";
21     print "<P>Selected Letter, <EM>",$query->param('letter'),"</EM>\n";
22     ($x,$y) = ($query->param('picture.x'),$query->param('picture.y'));
23     print "<P>Selected Position <EM>($x,$y)</EM>\n";
24 }
25
26 print $query->end_html;