Re: Can't load .JS file into Perl/CGI script.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks again Dragon.   When I tried to load the js file directly via the
browser, it showed the problem.
I had to adapt my quoting in the .JS file to work with the new loading
approach.

craigt

 

Dragon-4 wrote:
> 
> CraigT wrote:
> 
>>Thanks for responding Dragon.   I added the JavaScript mime type to the
HTTPD
>>file.   I restarted the server and tried to load the external JavaScript
>>file into the .CGI process from the supra-directory (root) and a
>>subdirectory to the cgi-bin directory.   The load from the root did not
>>work.   The load from the subdirectory tried to work but attempted to
>>execute the .JS file like a Perl/CGI program according to the Apache log.
>>The content type is given as below.
>>
>>              <script type='text/JavaScript' src='js/rnd.js'></script>
>>
>>I need more guidance.
> ---------------- End original message. ---------------------
> 
> As I said in my original post, you cannot have these files served 
> from anywhere under the cgi-bin directory if Apache is configured to 
> execute files in that directory as CGI scripts, (which it appears it 
> is from what you say above).
> 
> I would suggest making a directory under your document root directory 
> for these js files and serve them from there.
> 
> Does your server properly send a static HTML file from the document 
> root directory or any subdirectories?
> 
> What happens if you try to load the js file directly via the browser 
> (not as part of a script tag, just type the url of the js file in the 
> browser)?
> 
> Dragon
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Can%27t-load-.JS-file-into-Perl-CGI-script.-tp14422533p14442487.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux