robert@0: #!C:/strawberry/perl/bin/perl.exe robert@0: robert@0: robert@0: use CGI::Ajax; robert@0: use CGI; robert@0: robert@0: my $q = new CGI; robert@0: robert@0: robert@0: my %hash = ( 'card_list' => \&work, 'current_card' => \&funtwo); robert@0: robert@0: robert@0: robert@0: robert@0: my $pjx = CGI::Ajax->new(%hash); robert@0: $pjx->JSDEBUG(1); robert@0: $pjx->DEBUG(1); robert@0: print $pjx->build_html($q,\&gen); # this outputs the html for the page robert@0: robert@0: robert@0: robert@0: robert@0: robert@0: sub funtwo robert@0: { robert@0: return 14; robert@0: }; robert@0: robert@0: robert@0: robert@0: sub work robert@0: { robert@0: return 13; 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: sub gen robert@0: { robert@0: open FILE, " }; robert@0: };