March 19th, 2000, 02:33 PM
I am trying to use JS to include some files in a cgi script. I have tried both:
document.write("<!--#include virtual="../nav_side_main_home.inc" -->");
In both cases all that prints is the URL and not the file.
Can anyone offer assistance?
March 20th, 2000, 02:39 AM
March 20th, 2000, 06:25 AM
Thank you for your help.
What I am trying to do is the following.
I have a cgi search script. Results are yielded by mereging data with an html template. I can design the template however I like because it is just html. When results are shown on the screen, the url is search.cgi. Because it is a cgi my ssi's do not work. I need a way to structure the ssi's within a cgi.
As a side note I have also placed a .htacess file in my dir and tried the following:
AddHandler cgi-script .html
AddType text/x-server-parsed-html .html
The cgi works but still no ssi.
Thank you for any help you can lend.
[This message has been edited by artfold (edited March 20, 2000).]
March 22nd, 2000, 01:54 AM
Well, my expertise is with PHP and ASP, so I don't know how much help I can be, but in my PHP and ASP, for example, there is a built-in include method: include(), that let's me include any HTML I want to be output along with the server-generated code. If you are using Perl, I am sure there is a way. It might be a little more complicated, like using a command to open the file and read the contents into a variable, and then printf that variable into the perl output.
It really should be done with your server-side code, is my point.