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

Re: [cgiapp] calling run_mode if form has 2 submit buttons


Prakash Inuganti (pinugant) wrote:
> Hi,
> 
> I am only couple of days old to using CGI::Application. If my form has 2
> submit buttons and on click each should call a different run_mode, how do I
> handle that?. I can give one hidden field with name='rm', what do I do with
> the second one? Any help is appreciated.

You could do this a couple of ways...

1) name your submit buttons 'rm' and then use their values for the run
mode. The problem with this is that you are using part of the UI (the
text on the button) for you run mode.

2) Set up something in your cgiapp_prerun to check that if it's a
certain run mode and a certain submit button was pressed you would
change to a different mode (using prerun_mode() method).

HTH

-- 
Michael Peters
Developer
Plus Three, LP


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