Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

external Javascript in Perl

1 view
Skip to first unread message

Neelay

unread,
Nov 14, 2005, 2:45:00 PM11/14/05
to perl-ja...@perl.org, perl-ja...@moderators.isc.org
Hi,
I have an external Javascript file in /var/www/html folder called
head.js.
When I create an html file, say exp.html, and include head.js in its
<head> section, the result is as desired. However, when I write a Perl
script in /var/www/cgi-bin, say exp.pl and try to include the head.js
file, the Javascript output is not obtained on the page. Following line
includes the Javascript file in Perl-
print "<script src=\"..\/html\/head.js\" language=\"javascript\"
type=\"text\/javascript\">\n";
I also tried without the backslash (to escape the /) and also tried
placing the head.js file in the cgi-bin directory-
print "<script src=\"head.js\" language=\"javascript\"
type=\"text\/javascript\">\n";

Any ideas on what the problem could be?
Thanks.

-Neelay.

0 new messages