in reply to CGI printing to html?

It is possible (though not very nice IMO) to send a POST request to an html file. If you set the action for the form to point to form.html then this will send the data for the form back to the html file request. You can then use a test in form.cgi to see if you are actually getting form results and then parse those results accordingly. It really depends on exactly how much of the output on form.html is actually taken care of by form.cgi, however what you describe is still possible in any case.

I'm pretty sure I would rather go about this the other way by generating the form.html code from within form.cgi or just using two separate files and no SSI.

What exactly is your reasoning behind using SSI?

Hope this helps.

-caedes

Replies are listed 'Best First'.
Re: Re: CGI printing to html?
by Anonymous Monk on Jan 09, 2004 at 22:26 UTC
    The reason I am doing this is because I have a web template that has two includes (a header.html and a sidemenu.html). I want the script to load in menu.html so it appears in the same spot on every single one of my pages. I have it working, it loads just fine. The problem comes when they submit the form inside the menu, it redirects them to the perl script itself (therefor losing the template I was using).

    Can someone give me any ideas on how to make all errors and all data from a form.pl setup like this to print back on the html page?