|
From: Chris W. <ch...@cw...> - 2002-09-11 11:18:59
|
On Mon, 2002-09-09 at 19:31, Chris McDaniel wrote:
>
> Hi,
>
> Yes, I've actually tried that... and the eq as opposed to == thing - I
> wasn't thinking when I wrote that in the email I guess ;-)
>
> Anyway, here's what I've got right now... it's a bit of a mishmash of
> different things I've tried. The input is from a form that displays a
> number of records. When a record is changed, it sets a 'dirty' variable
> (with javascript, a hidden field) so that I can tell which ones have
> changed. $count comes from the form to indicate how many records have been
> displayed. And, of course, the delete parameter is from a checkbox...
Nothing immediately jumps out at me, so here's a shot at simplifying:
for my $i ( 0 .. $count ) {
my $dirty_field = "dirty$i";
my $delete_field = "delete$i";
...
my $is_dirty = $apr->param( $dirty_field );
if ( $is_dirty ) {
$R->scrib( 0, "Field [$i] is dirty" );
my $delete_status = $apr->param( $delete_field ) || 'off';
$R->scrib( 0, "Delete status of field [$i]: $delete_status" );
if ( $delete_status eq 'on' ) [
...
}
else {
...
}
}
}
See how that goes...
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988.
|