----- Original Message ----- From: "Jeff MacDonald" <suppressed>
To: "Jonathan Mangin" <suppressed> Cc: <suppressed>; <suppressed> Sent: Tuesday, May 31, 2005 10:09 AM Subject: Re: [cgiapp] calling run_mode if form has 2 submit buttons
How ugly might this be?
sub run_mode {
if ($selection eq "Button One") {
$do_this_stuff;
}
if ($selection eq "Button Two") {
$do_this_other_stuff;
}
}
Perhaps a bit prettier
sub run_mode {
if ($selection eq 'one') {
return $self->other_runmode();
}
if ($selection eq 'two') {
return $self->somethingrunmode();
}
}
--
Jeff MacDonald
http://www.halifaxbudolife.ca
Doesn't
return $self->other_runmode();
bypass cgiapp_prerun?
-Jon
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.