print "Content-type:text/html\n\n";
Javascript is not text/html. Usually JS is application/javascript or text/javascript.
cpy.js
.js is an unusual extension for a CGI program. I doubt that your web server is executing cpy.js unless you have tweaked your configuration. I would recommend using an appropriate extension like .cgi.
Try loading the Javascript directly. http://localhost/cpy.js or whatever. If you get Javascript then you're on your way but I expect you will get a mangled version of the perl script since it's being served as html rather than javascript.
As ikegami recommends, check the server log and the error console. If you have Firefox around, I'd recommend using a developer addon like Firebug to see what is going on inside the constructed page.
In reply to Re: Use dynamic stuff in CGI
by rowdog
in thread Use dynamic stuff in CGI
by roc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |