Skip Menu |

This queue is for tickets about the CGI-Ajax CPAN distribution.

Report information
The Basics
Id: 58535
Status: new
Priority: 0/
Queue: CGI-Ajax

People
Owner: Nobody in particular
Requestors: pause.perl.org_ [...] t_jeremykister.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.707
Fixed in: (no value)



Subject: CGI::Ajax problems with mod_perl 1.31
Using mod_perl 1.31 on Apache 1.3.41 <Files *.mpl> SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI allow from all </Files> if i use the attached ajax.pl (in regular perl mode) all reports normally. if i use the attached ajax.pl in mod_perl mode, random times the $param result in the perl_func sub is undefined (because all of $q->param is empty). cannot replicate without CGI::Ajax.
Subject: ajax.pl
use strict; use CGI qw(:standard -nosticky); use CGI::Ajax; my $q = CGI->new; my $pjx = new CGI::Ajax( 'exported_func' => \&perl_func ); print $pjx->build_html( $q, \&Show_HTML, { -expires => 'now' } ); sub perl_func { my $input = shift; my $param; foreach my $key ($q->param){ if($key =~ /^\d+$/){ if($q->param($key) == $input){ $param = $key; last; } } } my $output = "set value for [$param] to [$input]"; return( $output ); } sub Show_HTML { my $html = <<EOHTML; <HTML> <BODY> 123: <select name="123" id="123" onchange="exported_func( ['123'], ['result'] );"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <br> 567: <select name="567" id="567" onchange="exported_func( ['567'], ['result'] );"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <br> <br> <div id="result"></div> </BODY> </HTML> EOHTML return $html; }