in reply to Telling a file included in a web page something
Well, this is really off-topic - this isn't a perl question so much as an apache question.
The first thing you need to clear up is some misconceptions about what executes where. Your <!-- #include --> is a server-side include (SSI) - in other words, it executes on the server. Your proposed fix - which is certainly the right kind of thinking - won't work because Javascript executes on the client side, in the browser, long after the response has left the server (and thus the SSI handler).
You can learn a lot more about SSI from http://httpd.apache.org/docs/2.2/howto/ssi.html. It sounds like you don't have control over the webserver, and you don't have privileges to execute anything on the webserver. In other words, if you can't execute file.pl as a CGI on its own, you certainly won't be able to include its output via SSI. So, you just won't be able to do anything dynamic on the server end.
And thus you may be barking up the right tree with the Javscript. Just drop the SSI. Why not have the main page load, read the requested project from its own URL, somehow(*) fetch the contents of the project using Javascript, and then write the contents using document.write statements.
(*) Therein lies the rub. Here's a few ways.
|
|---|