I need to include a file along the lines of:
<!--#include virtual="/directory/structure/file.pl?project=projectName-->
But I have a problem. I don't know in advance what project I need to include. I want that to be passed to the file in the main URL like:
www.site.com/directory/file.shtml?project=projectNatme
I have parsed the variable into a usable Javascript variable, and tried to write the include file into the page like
document.write( '<!--' + '#include virtual="/directory/structure/'+'file.pl?project='+projectName+'"-->');
in an attempt to pass the information onward to the Perl script, but this is not working. (If I don't split up the include call, the include happens without the variable being added. If I do, it doesn't work at all.)
I suspect that there is a better way to get the information to my file.pl, but I don't know what that might be. Here is the caveat: file.pl can't be run as a standalone CGI. It HAS to be an include. Any ideas?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.