![]() |
|
|
|||||||
![]() |
PERL - Re: Including javascripts in HTML - it appears as the script never loads |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Jim Rendant wrote:
> I have web pages broken down into several parts because most of it is > dynamic. PERL creates all the dynamic data files and then prints them to > STDOUT which is the browser. It appears as though the <script> tag never > loads the upsalt.js file. I have > included examples of the routine and files. .... > Jim Rendant .... The chances are pretty good that either your webpage1.txt is not in the directory where your CGI script is looking for it, or your upsalt.js file is not in the directory where the web server is looking for it. These are web server configuration issues, not a Perl issue, and so is offtopic for this newsgroup. Study your server docs carefully and if you can't figure out where the files go, look at a web server newsgroup's FAQ, like perhaps comp.infosystems.www.authoring.cgi, and if you're still stuck, ask there. If you're not using CGI and CGI::Carp qw(:fatalsToBrower), be sure to add those, as it might give you insight into what is happening (like if the open in your CGI script fails). In my particular case, when I ran your code (with a header added), Carp showed very nicely that the open was failing. Your code worked fine when I changed "webpage1.txt" to "htdocs/webpage1.txt". In my case, the CGI script is looking for files starting in the "server root" directory. That may vary with other web servers or with web server configuration. -- Bob Walton Bob Walton |
|
|