view BASE.pl @ 106:5b0753c6f34d laserkard tip

updated to newest compojure and a simpler syntax
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 20:22:58 -0400
parents 7742910e0479
children
line wrap: on
line source
1 #!/usr/bin/perl
4 use List::Util qw(first max maxstr min minstr reduce shuffle sum);
5 use Storable;
6 use CGI::Ajax;
7 use CGI;
11 my $q = new CGI;
15 my %hash = (
17 'material' => \&material,
18 'pokedex' => \&pokedex,
19 'template' => \&template,
20 'inputbox' => \&inputbox,
21 'display' => \&display,
22 'change_rules' => \&change_rules,
23 'vanish' => \&vanish
24 );
28 my $pjx = CGI::Ajax->new(%hash);
29 #$pjx->JSDEBUG(1);
30 #$pjx->DEBUG(1);
32 print $pjx->build_html($q,\&gen,{-Cache_Control => 'no-store, no-cache, must-revalidate', -Pragma => 'no-cache'}); # this outputs the html for the page
52 sub gen
53 {
55 $a = <<HERE;
58 <html>
61 <TABLE border="2">
62 <TR bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';">
63 <TD>Mauritania</td>
64 <TD>21N</TD>
65 <TD>24N</TD>
66 <TD>&nbsp;</TD>
67 <TD>&nbsp;</TD>
68 </TR>
69 <TR bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';">
70 <TD>Myanmar</td>
71 <TD>&nbsp;</TD>
72 <TD>M TBA</TD>
73 <TD>M TBA</TD>
74 <TD>&nbsp;</TD>
75 </TR>
76 <TR bgcolor="#FFFFFF" onClick="parent.location='index.html'" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';" >
77 <TD>Nepal</td>
78 <TD>&nbsp;</TD>
79 <TD>&nbsp;</TD>
80 <TD>&nbsp;</TD>
81 <TD>M TBA</TD>
82 </TR>
83 </TABLE>
84 </html>
85 HERE
87 return $a;
90 }