Click to See Complete Forum and Search --> : Chain of forms, scripts and templates


anroy
09-04-2005, 07:33 AM
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">

Jeff Mott
09-04-2005, 09:04 AM
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?Yup, that's just fine. I couldn't spot any problem in the code you posted. Since it only happens sometimes perhaps this is because the server's or your internet connection is having problems (a completely wild guess, btw).

anroy
09-05-2005, 12:37 PM
Thanks for the feedback Jeff. However I doubt the cause is intermittent connection problems. Here is the deal...

It happens only when I use SSL, and the browser is IE. In this situation it happens most of the time, (in fact nearly all the time).

It does NOT occur if I do not use SSL. It does NOT occur in Firefox, with or without SSL. I also gave it a spin on Opera using SSL and it worked fine.

So just the combination of SSL on IE, so far. And almost all the time.

Pretty weird, huh?

Nedals
09-07-2005, 07:28 PM
Do your templates contain a form that is simply submitted (posted?) or are you using some javascript for validation that may not work in IE?
Do you use ANY browser detection that changes the page for some reason?

If the answer to both is 'no', then the scripts should work with the browsers mentioned; with or without SSL.

Can you more clearly define 'intermittent connection problems' and maybe post a link.