Dermot Paikkos wrote:
Hi,


[...]


These reports are actually users clock-in/clock-out times for the week. So the reports would are generated weekly printed and rarely used again. The issue was that if the HR person uses IE5/6 the

Oh. I see not a very heavy loaded service :-). Are you running the server on win32?


That besides, the above method didn't work (see mail to list "Accessing form multiples". I think you replied to it. Whenever I tried to loop through the incoming list of "user=dermot+paikkos&user=joe+blogs" I was only getting the first user.

Although that's perl here's the explanation.

because $r->param( "key" ) can be used in 2 contexts
(see perldoc -f wantarray). That's something very specific to
perl which you maybe not familiar with when have used langs
like java, c++, ...:

1. List-Context    => returns list of values:
---------------------------------------------
Example for list contexts:
@vals = $r->param("keys")
foreach( $r->param("keys") )
@hash_slice{$r->param("keys")}

2. Scalar-Context => returns first value of list:
-------------------------------------------------
$val = $r->param("keys")
$hash{$r->param("keys")}


Still not sure why I can do

my $r=Apache::Request->new(shift);
my @users;
foreach my $param ($r->param) {
push(@users,$r->param($param));
}

here you are in list context.

@user{$apr->param("keys")} = ();
map { $user{$_} = 0 } keys %user;


and not:

my $r=Apache::Request->new(shift);
my %users;
foreach my $param ($r->parm) {
        %users{$r->param($param) = 0;
}


That's not valid syntax at all if you meant $user{$r->param($param)} = 0 then you are here in scalar context.



I am sure you code would work fine but what I have managed to do seems to work in both IE and firefox and is code I can manage. If I got stuck on yours I would out of my depth. So a sincere thanks but I am going to stick with what I have for now.
Thanx.
Dp.




Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to