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

RE: [cgiapp] run_modes problem


You are encountering the CGI sticky behavior. Use the option -override
=> 1

Jay Flowers
Integic
Health Care


-----Original Message-----
From: Stephen Lim [mailto:suppressed 
Sent: Tuesday, July 01, 2003 5:25 AM
To: suppressed
Subject: [cgiapp] run_modes problem

Hi all,

I'm new to the list, but been using CGI::Application a few 
times. But I never had any problem similar to what I'm 
having now ...

Somehow, the run_modes in setup() method doesn't pick up the 
correct run_mode as specified in the URL. My setup() method 
is as below :

sub setup {
   my $self = shift;
   $self->start_mode('displayForm');
   $self->mode_param('rm');
   $self->run_modes(
     'displayForm' => 'DisplayRegistrationForm',
     'registerUser' => 'RegisterNewUser'
   );
}

And my HTML form is as below :
<form name="registrationForm" method="post" 
action="/cgi-bin/registration.cgi?rm=registerNewUser">
    ..... some stuff
<input type="submit" value="Register" name="submitButton" />
</form>

Somehow, when I tried to click the submit button, it still 
run the displayRegistrationForm() method rather than 
registerNewUser() method, although in the URL, it is clearly 
displayed :
http://..../cgi-bin/registration.cgi?rm=registerNewuser

Any idea where have I gone wrong ?



-- 
</rux>


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


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