[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] get_previous_runmode() ?


Michael Hirmke wrote:

I'm writing a CGI, which has three different input modes, but only one
check function for all three of them. This check function gets called
from cgiapp_prerun, whenever in one of the three input modes the "Save"
button is submitted. If the check function finds any error, it returns
false, in which case the runmode should be switched back to where we
came from. If the check function returns true, cgiapp_prerun leaves the
"Save" mode as it is and the save function is called.

When I was faced with this same problem I just passed the name of the current (soon to be previous) run mode as a hidden input parameter. That way I could easily return to the previous run mode if something went wrong.

--

Dan Coutu
Managing Director
Snowy Owl Internet Consulting, LLC
http://www.snowy-owl.com/



---------------------------------------------------------------------
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.