Hi lishevita,

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.
  1. Use IFRAME tags. Only supported by IE.
  2. Make your page a frameset, and make one frame have zero width; then load your auxilary content in the spare frame. Some browsers won't allow a zero-width frame.
  3. Like the frameset approach, but use window.open to make popup windows and load the content there. Of course, pop-up blockers will snare you.
There is no perfect solution this way; each involves ome trade-offs. Anyway, my $0.02 . Good luck.

In reply to Re: Telling a file included in a web page something by clwolfe
in thread Telling a file included in a web page something by lishevita

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.