From: Kai A. <kai...@gm...> - 2005-10-12 16:40:38
|
Hi Terrence, first let me thank you for your time > > There's a fully functioning CGI::Prototype app here: > > http://www.metaperl.org/Guestbook I have already looked at it earlier, and it's nice - I really did not think I had any problems understanding the logic or the relationship between the files. > > and added a app.cgi like: : > > But filling out the form and submitting it, only yields the same page. > > What did the FORM action attribute action have? it has action=3D"http://localhost/test/app.cgi" as appropriate, and method= =3D"post" Also I forgot to mention that the page source validates (i.e. the form is closed). > Yes, I think what you are missing is the concept of dispatch. If you look > at the activate method in package CGI::Prototype (the easiest way to lear= n > CGIP is to look at the source code), it calls dispatch early on in the > activate method. The default dispatch method looks like this: > > sub dispatch { > my $self =3D shift; > return $self; # do nothing, stay here > } No, -well dispatch might be a better place than render_enter for what I know, but the dispatch actually does happen. The problem seems to be that when posted, the params are not seen serverside? app.cgi only uses My/App.pm which extends CGIPH, which defaults to call welcome.pm welcome.pm does dispatch using render_enter where control is transferred to thanks.pm only if both params first and last is available, but that only happens when I set those params in the url.=20 I still don't get why...?? Kai |