M
mjl69
A slightly altered cut & paste from CGI-Application that works:
sub do_stuff
{
my $self = shift;
# Get CGI query object
my $q = $self->query();
my $output = '';
$output .= $q->start_html(-title => 'Page One');
$output .= $q->h1("Hello, This is page one!");
$output .= $q->start_form();
$output .= $q->hidden(-name => 'rm', -value => 'mode2', -override => 1);
$output .= $q->submit();
$output .= $q->end_form();
$output .= $q->end_html();
return $output;
}
Actual sample code from CGI-Application that does not work as expected
sub showform {
my $self = shift;
# Get CGI query object
my $q = $self->query();
my $output = '';
$output .= $q->start_html(-title => 'Widget Search Form');
$output .= $q->start_form();
$output .= $q->textfield(-name => 'widgetcode');
$output .= $q->hidden(-name => 'rm', -value => 'mode2'); #note no override
$output .= $q->submit();
$output .= $q->end_form();
$output .= $q->end_html();
return $output;
}
I was wondering why my CGI app was not going to the next page, but it was fixed by adding the override. I saw that
Sam Tregar did it this way in his book. Why does CGI-Application document it without override? I assumed that as an
extension of CGI, that the author had done away with stickiness internally.
mjl
sub do_stuff
{
my $self = shift;
# Get CGI query object
my $q = $self->query();
my $output = '';
$output .= $q->start_html(-title => 'Page One');
$output .= $q->h1("Hello, This is page one!");
$output .= $q->start_form();
$output .= $q->hidden(-name => 'rm', -value => 'mode2', -override => 1);
$output .= $q->submit();
$output .= $q->end_form();
$output .= $q->end_html();
return $output;
}
Actual sample code from CGI-Application that does not work as expected
sub showform {
my $self = shift;
# Get CGI query object
my $q = $self->query();
my $output = '';
$output .= $q->start_html(-title => 'Widget Search Form');
$output .= $q->start_form();
$output .= $q->textfield(-name => 'widgetcode');
$output .= $q->hidden(-name => 'rm', -value => 'mode2'); #note no override
$output .= $q->submit();
$output .= $q->end_form();
$output .= $q->end_html();
return $output;
}
I was wondering why my CGI app was not going to the next page, but it was fixed by adding the override. I saw that
Sam Tregar did it this way in his book. Why does CGI-Application document it without override? I assumed that as an
extension of CGI, that the author had done away with stickiness internally.
mjl