Mercurial > boosterpack
comparison scripts/pjx_nobuild.pl @ 0:477258d09353 boosterpack
[svn r1] initial import
author | robert |
---|---|
date | Sun, 30 Aug 2009 02:19:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:477258d09353 |
---|---|
1 #!C:/strawberry/perl/bin/perl.exe | |
2 | |
3 use strict; | |
4 use CGI::Ajax; | |
5 | |
6 my $my_func = sub { | |
7 my $arg = shift; | |
8 return ( $arg . " with some extra" ); | |
9 }; | |
10 | |
11 my $pjx = new CGI::Ajax( 'tester' => $my_func ); | |
12 $pjx->JSDEBUG(1); | |
13 $pjx->DEBUG(1); | |
14 | |
15 use CGI; | |
16 my $cgi = new CGI(); | |
17 print $cgi->header(); | |
18 | |
19 $pjx->cgi( $cgi ); | |
20 | |
21 my $html = ""; | |
22 $html .= "<HTML>"; | |
23 $html .= "<HEAD>"; | |
24 | |
25 $html .= $pjx; | |
26 | |
27 $html .= <<EOT; | |
28 </HEAD> | |
29 <BODY> | |
30 <FORM name="form"> | |
31 <INPUT type="text" id="inarg" | |
32 onkeyup="tester(['inarg'],['output_div']); return true;"> | |
33 <hr> | |
34 <div id="output_div"></div> | |
35 </FORM> | |
36 <br/><div id='pjxdebugrequest'></div><br/> | |
37 </BODY> | |
38 </HTML> | |
39 EOT | |
40 | |
41 if ( not $cgi->param('fname') ) { | |
42 print $html; | |
43 } else { | |
44 print $pjx->handle_request(); | |
45 } | |
46 |