Gossamer Forum
Home : General : Perl Programming :

Chain of forms, scripts and HTML::Template

Quote Reply
Chain of forms, scripts and HTML::Template
Hi! I am an experienced C/C++ PC application programmer but a complete newbie to Perl, CGI, HTML::Templates, and internet programming generally. Smile I have created a simple sequence of forms, CGI scrips, and templates. I am sometimes getting an error displaying the final template in Internet Explorer when it is used under SSL. The "sometimes is the disconcerting part. My question here is not so much about SSL, but if what I am doing is valid in the first place. To sum up here is what I am doing. HTML file with form -> cgi script -> template with form -> cgi script -> template I am passing data from the forms to cgi via "post" and then using the Perl CGI "param" command. I am passing data from CGI to templates using $template->param(). I get the "The page cannot be displayed" error in IE at the last step, ie. when the last CGI script is trying to display the last template. The gory details are below, for your reference. But my question is pretty basic. Is is OK to display a template with a form in it, call a CGI from that form, and have that CGI display another template? Thanks,
Arka Roy
---------------- Access: https://ssl.somedomain.com/Login.html |
|
V
Login.html
---------
- user fills form
- user presses submit
|
|
V
DisplayForm.cgi
---------
my $template = HTML::Template->new( filename => 'Form.tmpl' );
$template->param( displayValue => $myValue );
print "Content-Type: text/html\n\n";
print $template->output;
|
|
V
Form.tmpl
---------
- displays <tmpl_var name="displayValue">
- user fills form
- user presses submit
|
|
V
SubmitData.cgi
---------
my $template = HTML::Template->new( filename => 'SubmitDone.tmpl' );
$template->param( displayResult => $myResult );
print "Content-Type: text/html\n\n";
print $template->output;
|
|
V
SubmitDone.tmpl
---------
- displays <tmpl_var name="displayResult">

http://talesoftech.blogspot.com/
Subject Author Views Date
Thread Chain of forms, scripts and HTML::Template anroy 5734 Sep 4, 2005, 5:55 AM
Thread Re: [arka roy] Chain of forms, scripts and HTML::Template
Chaz 5506 Sep 4, 2005, 8:48 PM
Thread Re: [Chaz] Chain of forms, scripts and HTML::Template
anroy 5574 Sep 5, 2005, 9:55 AM
Post Re: [arka roy] Chain of forms, scripts and HTML::Template
Alex 5459 Sep 8, 2005, 12:42 PM