rlm@0: #!C:/strawberry/perl/bin/perl.exe rlm@0: rlm@0: use strict; rlm@0: use CGI::Ajax; rlm@0: rlm@0: my $my_func = sub { rlm@0: my $arg = shift; rlm@0: return ( $arg . " with some extra" ); rlm@0: }; rlm@0: rlm@0: my $pjx = new CGI::Ajax( 'tester' => $my_func ); rlm@0: $pjx->JSDEBUG(1); rlm@0: $pjx->DEBUG(1); rlm@0: rlm@0: use CGI; rlm@0: my $cgi = new CGI(); rlm@0: print $cgi->header(); rlm@0: rlm@0: $pjx->cgi( $cgi ); rlm@0: rlm@0: my $html = ""; rlm@0: $html .= ""; rlm@0: $html .= ""; rlm@0: rlm@0: $html .= $pjx; rlm@0: rlm@0: $html .= < rlm@0: rlm@0:
rlm@0: rlm@0:
rlm@0:
rlm@0:
rlm@0:

rlm@0: rlm@0: rlm@0: EOT rlm@0: rlm@0: if ( not $cgi->param('fname') ) { rlm@0: print $html; rlm@0: } else { rlm@0: print $pjx->handle_request(); rlm@0: } rlm@0: