Mercurial > rlmcintyre
comparison BoosterPack/scripts/.svn/text-base/pjx_nobuild.pl.svn-base @ 0:0d795f02a8bb tip
initial committ. what was I thinking?
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 27 Sep 2010 16:57:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0d795f02a8bb |
---|---|
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 |