Forum Moderators: open
So I was thinking, why not have a Perl script write out all the ads? All I'd need was a way to pass the height of the page to the Perl script.
And that's where I'm stuck.
I tried using JavaScript to write out an include line, like so:
<script type="text/javascript">
testHeight='1000';
stringToWrite = '<' + '!--#include virtual="/filler.cgi?' +testHeight+ '"-->';
document.write(stringToWrite);
</script>
But no output appears when I load the page. Yes, I have the Add-Handler line in my <.htaccess> file and other SSI's work in general. It's a big site and all the pages are HTML, not dynamically generated, but we do use lots of SSI.
Notice I split up stringToWrite, because if I iclude the < sign next to the! sign then the server parser just executes the include right away, rather than waiting for the string to be drawn.
I'm guessing I can't do it this way, because by the time JavaScript has written the SSI line, the server has already washed its hands of the file and any SSI directives it contains.
If so, the question then becomes: Assuming I already got the page height with JavaScript, how can I pass that page height to my Perl CGI script?
Thanks for your help.