Dominic Mitchell (dom@happygiraffe.net)
London JavaScript Night, May 2006
happygiraffe.net/presentations/cgi-ajax-lightning
$Id: index.html 796 2006-05-24 23:30:02Z dom $
Links from the slide:
#!perl -w
use strict;
use CGI;
my $cgi = CGI->new();
print $cgi->header();
# ... exercise for the reader ...
print $template->output();
# Do something dynamic.
sub uptime { `uptime` }
#!perl -w
use strict;
use CGI;
use CGI::Ajax;
my $cgi = CGI->new();
my $ajax = CGI::Ajax->new( uptime => \&uptime );
print $ajax->build_html( $cgi, \&main );
sub main {
print $cgi->header();
# ...
print $template->output();
}
# Do something dynamic.
sub uptime { `uptime` }
<div>
<input type="button" name="uptime" value="Uptime?"
onclick="uptime([],['overhere'])" />
<span id="overhere"/>
</div>
Links from the slide:
perl.com/pub/a/2006/03/02/ajax_and_perl.html
Links from the slide: