http://qs321.pair.com?node_id=603568


in reply to CGI::Ajax + Template::Toolkit Question

It may be that CGI::Ajax expects build_html to return the html (or updated html) for the page. However, by default, $tt->process($template, $vars) will print the processed output to STDOUT. Try something like the following:
sub main_page { my $output = ''; $tt->process($template, $vars, \$output) || die $tt->error(), "\n"; return $output; }
which will stuff the processed template into $output.