in reply to Re^3: Ajax in perl
in thread Ajax/perl/javascript in perl
This is an example of something I am trying to do. I want this Ajax function to run every 5 seconds to update my html div tag.Use CGI::Ajax; Use CGI; use DBI; my $ajax = new CGI::Ajax('report' => \&report); <html> <body> <input type="button" value="submit" onclick="setInterval('report([\'ar +gs__real\',\'args__monk\'],[\'re\'])', 5000)" </body> <div id="re"><div> </html> sub report { my $input1 = shift; my $input2 = shift; $dbh=DBI->connect("DBI:mysql:$db;host=$host","$user","pass"); $re=$dbh->perpare("select * from table where firstname="$input1" and l +asname="input2"); return $re }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Ajax in perl
by bart (Canon) on Apr 26, 2010 at 08:21 UTC | |
|
Re^5: Ajax in perl
by Corion (Patriarch) on Apr 26, 2010 at 07:37 UTC |