diff scripts/pjx_nobuild.pl @ 0:477258d09353 boosterpack

[svn r1] initial import
author robert
date Sun, 30 Aug 2009 02:19:26 -0400
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/pjx_nobuild.pl	Sun Aug 30 02:19:26 2009 -0400
     1.3 @@ -0,0 +1,46 @@
     1.4 +#!C:/strawberry/perl/bin/perl.exe
     1.5 +
     1.6 +use strict;
     1.7 +use CGI::Ajax;
     1.8 +
     1.9 +my $my_func = sub {
    1.10 +  my $arg = shift;
    1.11 +  return ( $arg . " with some extra" );
    1.12 +};
    1.13 +
    1.14 +my $pjx = new CGI::Ajax( 'tester' => $my_func );
    1.15 +$pjx->JSDEBUG(1);
    1.16 +$pjx->DEBUG(1);
    1.17 +
    1.18 +use CGI;
    1.19 +my $cgi = new CGI();
    1.20 +print $cgi->header();
    1.21 +
    1.22 +$pjx->cgi( $cgi );
    1.23 +
    1.24 +my $html = "";
    1.25 +  $html .= "<HTML>";
    1.26 +  $html .= "<HEAD>";
    1.27 +
    1.28 +  $html .= $pjx;
    1.29 +
    1.30 +  $html .= <<EOT;
    1.31 +  </HEAD>
    1.32 +  <BODY>
    1.33 +  <FORM name="form">
    1.34 +  <INPUT type="text" id="inarg"
    1.35 +    onkeyup="tester(['inarg'],['output_div']); return true;">
    1.36 +  <hr>
    1.37 +  <div id="output_div"></div>
    1.38 +  </FORM>
    1.39 +  <br/><div id='pjxdebugrequest'></div><br/>
    1.40 +  </BODY>
    1.41 +  </HTML>
    1.42 +EOT
    1.43 +
    1.44 +if ( not $cgi->param('fname') ) {
    1.45 +  print $html;
    1.46 +} else {
    1.47 +  print $pjx->handle_request();
    1.48 +}
    1.49 +