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/
Quote Reply
Re: [arka roy] Chain of forms, scripts and HTML::Template In reply to
That all looks fine to me. When IE give you that error what shows up in your Apache logs?

~Charlie
Quote Reply
Re: [Chaz] Chain of forms, scripts and HTML::Template In reply to
Thanks for the feedback Charlie.

You know, as bizarro as it sounds, the hosting company for the site in question no longer provides access to error logs. At least that is what it said on their support pages. I will call them tomorrow and find out if this is really the case.

Will post again here with any new info I can get.
http://talesoftech.blogspot.com/
Quote Reply
Re: [arka roy] Chain of forms, scripts and HTML::Template In reply to
Ack, find a new hosting company if they don't provide access to the error logs. Trying to debug any sort of CGI without seeing what the error logs say is very very difficult. =)

Cheers,

Alex
--
Gossamer Threads Inc.