RE: On one of my computers, php can't see an external javascriptI included

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

 



> -----Original Message-----
> From: Carlos Medina [mailto:info@xxxxxxxxxxxxxxxxxx]
> Sent: Thursday, August 14, 2008 2:06 AM
> To: php-general@xxxxxxxxxxxxx
> Subject: Re:  On one of my computers, php can't see an external
> javascriptI included
> 
> googling1000 schrieb:
> > I have apache and php on Windows.
> > I have 3 computers. A php file is calling an external .js file.
> > Two of my computers have no problem calling a .js file, there's only
> one
> > machine that doesn't execute functions inside of the .js file.
> >
> > My .php file has the following line in the beginning of the file:
> > <script src="myfunctions.js"></script>
> >
> >
> > My .js file consists of a number of functions written in javascript
> >
> > I don't know why functions inside .js file doesn't get executed.
> >
> > I tried copy/paste all the functions inside the .js file to my .php
> file and
> > it works.
> > I don't understand how my machine can't read an external .js file
> >
> > I'm frustrated. Help will be appreciated!
> Hi,
> to check where your log are look at the Apache directory. If you are
> using a bundle or apache with installer you will find your directory
> apache/logs there where apache was installed ( The Windows way is easy
> -
> for all then doesnt know about windows );-)

Wouldn't it be entirely (well.. okay.. not ENTIRELY) up to his *browser*
as to whether or not the Javascript file is loaded? The <script> tag is
just an instruction to the client-side of things, it doesn't cause
Apache to do anything special. The browser reads the <script> tag and
loads whatever the "src" attribute points to. Also... perhaps try
<script type="text/javascript">... I doubt not specifying the script
language is breaking your page, but it wouldn't hurt to be a bit more
rigid. :)

I think it might be your URL. I'd recommend using Firefox and the
Firebug plug-in to see if your .js file is even being touched via HTTP
in the first place.


Todd Boyd
Web Programmer




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux