AjaxExample.pl ============================================================ #!perl use DBI qw(:sql_types); use CGI; use CGI qw/:standard/; use CGI::Ajax; my $cgi = new CGI(); #-------------------------------------------------------------------- # Mapping the Perl subroutine to the triggering function #-------------------------------------------------------------------- my $ajax = new CGI::Ajax( 'saveStudInfo_JScript' => \&saveStudInfo_PerlScript ); $cgi->header(-charset=>'US-ASCII'); print $ajax->build_html($cgi,\&generateHTML); #-------------------------------------------------------------------- # Subroutine which generates the HTML #-------------------------------------------------------------------- sub generateHTML { # Hash which contains existing data %Students = get_Student_Info(); $cnt = 1; # Write the html code in the form of a string $returnHTML .= "\n"; $returnHTML .= "\n
"; $returnHTML .= "\n