Mercurial > boosterpack
view scripts/pjx_checkbox.pl @ 6:4246c7ef6487 boosterpack
[svn r8] bug fix -- holos need to be one int three compared to rares
author | robert |
---|---|
date | Tue, 08 Sep 2009 17:20:52 -0400 |
parents | 477258d09353 |
children |
line wrap: on
line source
1 #!C:/strawberry/perl/bin/perl.exe2 use strict;3 use CGI::Ajax;4 use CGI;7 my $perl_func = sub {8 my $input = shift;10 print "got $input";11 };13 sub Show_HTML {14 my $html = "";15 $html .= <<EOT;17 <html>18 <head><title>CGI::Ajax Example</title>19 </head>20 <body>21 <form>22 <input type="checkbox" name="val1" id="val1" value="44" size="6" /> val1<br/>23 <input type='submit' onmouseover=jsFunc(['val1'],['out']); />25 <div id="out"> </div>26 </body>27 </html>28 EOT30 return $html;31 }33 my $cgi = new CGI(); # create a new CGI object35 my $pjx = new CGI::Ajax( 'jsFunc' => $perl_func );36 $pjx->JSDEBUG(1);37 $pjx->DEBUG(1);39 print $pjx->build_html($cgi,\&Show_HTML); # this outputs the html for the page