sanjay nayak has asked for the wisdom of the Perl Monks concerning the following question:
#!C:\Perl\bin\perl.exe -w use strict; use CGI; # or any other CGI:: form handler/decoder use CGI::Ajax; my $cgi = new CGI; my $pjx = new CGI::Ajax( 'exported_func' => \&perl_func ); print $pjx->build_html( $cgi, \&Show_HTML); sub perl_func { my $input = shift; # do something with $input my $output = $input . " was the input!"; return( $output ); } sub Show_HTML { my $html = <<EOHTML; <HTML> <BODY> Enter something: <input type="text" name="val1" id="val1" onkeyup="exported_func( ['val1'], ['resultdiv'] );"> <br> <div id="resultdiv"></div> </BODY> </HTML> EOHTML return $html; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why the following code shows a compilation error?
by ccn (Vicar) on Dec 19, 2008 at 09:50 UTC | |
|
Re: Why the following code shows a compilation error?
by ikegami (Patriarch) on Dec 19, 2008 at 09:50 UTC | |
|
Re: Why the following code shows a compilation error?
by Anonymous Monk on Dec 19, 2008 at 10:30 UTC | |
|
Re: Why the following code shows a compilation error?
by svenXY (Deacon) on Dec 19, 2008 at 09:57 UTC | |
by Annoymous Monk (Sexton) on Dec 19, 2008 at 10:14 UTC | |
by sanjay nayak (Sexton) on Dec 19, 2008 at 10:55 UTC | |
|
Re: Why the following code shows a compilation error?
by jeffa (Bishop) on Dec 19, 2008 at 21:09 UTC |