robert@0: #!C:/strawberry/perl/bin/perl.exe robert@0: use strict; robert@0: use CGI::Ajax; robert@0: use CGI; robert@0: robert@0: my $q = new CGI; robert@0: robert@0: my $concatter = sub { robert@0: my $str = "All Values Are
\n"; robert@0: map { $str .= ' and ' . $_ } @_; robert@0: print STDERR $str; robert@0: return $str; robert@0: }; robert@0: robert@0: my $Show_Form = sub { robert@0: my $html = ""; robert@0: $html = < robert@0: CGI::Ajax Multiple Return Value Example robert@0: robert@0: robert@0:
robert@0:
robert@0:
robert@0:
robert@0:
robert@0:
robert@0:
robert@0:
robert@0:
robert@0:
robert@0: robert@0:
robert@0: robert@0:
robert@0:
robert@0: robert@0: robert@0:
robert@0: robert@0: robert@0: EOT robert@0: ; robert@0: robert@0: return $html; robert@0: }; robert@0: robert@0: robert@0: my $pjx = CGI::Ajax->new( 'jsFunc' => $concatter); robert@0: $pjx->JSDEBUG(2); robert@0: $pjx->DEBUG(1); robert@0: print $pjx->build_html($q,$Show_Form); # this outputs the html for the page