#!/usr/bin/perl -w # ajaxCheckbox.pl - a script to test Ajax functionality use strict; use CGI qw/:standard/; use CGI::Ajax; use DBI; # --- database authenication my $dbh = do 'db.inc'; my $query = q{ SELECT project.project_id, project.name, project.phase, prio.prio, HEX((255 - prio.prio)) AS hex, begun, tags FROM project JOIN prio ON (project.project_id = prio.project_id) WHERE completed < 1 ORDER BY prio.prio DESC LIMIT 3}; my $sth = $dbh->prepare($query); $sth->execute(); my $result = $dbh->selectall_arrayref($sth); my $cgi = new CGI; my $pjx = new CGI::Ajax( 'toStruck' => \&perl_func ); print $pjx->build_html( $cgi, \&Show_HTML); sub Show_HTML { use CGI qw/:standard/; my $html = <