[sf-perl] FORMS - page "navigation"
Dave Turner
dave at wrightpopcorn.com
Fri Jun 13 17:54:03 PDT 2008
Try looking at a dispatch table. That way you can dispatch to a page
based on your parameters.
From Wikikpedia (http://en.wikipedia.org/wiki/Dispatch_table)
|#define the table using one anonymous code-ref and one named code-ref
my %dispatch = (
"-h" => sub { print "hello\n"; },
"-g" => \&say_goodbye
);
sub say_goodbye {
print "goodbye\n";
}
#fetch the code ref from the table, and invoke it
my $sub = $dispatch{$ARGV[0]};
and this: http://dren.ch/perl_dispatch_tables/
Hope that helps!
print $sub ? $sub->() : "unknown argument\n";
|
ken uhl wrote:
> Hi, my Forms are not "acting" nicely, page to page flow is not correct,
>
> Page one prompts for search criteria:
> ...
> $scriptname = $q->script_name();
> ...
> <FORM METHOD="post" ACTION="${scriptname}">
> ...
> <INPUT TYPE=submit NAME="select" VALUE="Select Record(s) to Delete">
> ....
> The submit button goes nicely to second page results.
>
>
> Second page :
> Dispplays table of results, and buttons to do bulk delete, which
> should retrieve selected check box values:
>
> $scriptname = $q->script_name();
> ...
> <FORM METHOD="post" ACTION="${scriptname}">
> ...
> <INPUT TYPE="submit" VALUE="bulk_delete" NAME="Bulk Deleter" >
>
> This goes back to page one.
> I want it to continue - checking page params - specifically to retrieve
> selected check boxes,
> but It does not progress.
>
> Any Help would be greatly appreciated .
>
> Ken Uhl
> UC Berkeley.
>
>
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 8.0.100 / Virus Database: 270.3.0/1501 - Release Date: 6/13/2008 6:33 AM
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080613/deb2cb58/attachment.html
More information about the SanFrancisco-pm
mailing list