Re: why this doesn't work as an external file but does internally?

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

 



* Thus wrote Aaron Wolski:
> 
> 
> > 
> > What error messages are produced?
> > What does the remotely included file output?
> > Does the second variable have value?
> > Can you provide a link to where we can see the issue at play?
> > So on, and so forth.
> > 
> > Look at the source of your page that "doesn't work", where the JS is
> > supposed to be, and chances are, you'll see the problem.
> 
> Ok.. here are 3 links:
> 
> https://celestica.tristarpromotions.com/NEW/index2.php
> 
> This link... you'll see that the rollover effects on the top menu work.
> The external JS file (called: jsstuffnew.php) has code that looks like:
> 
> img1on = new Image();   img1on.src = "<?php echo $base_url;
> ?>Graphics/home_on.gif";
> 
> https://celestica.tristarpromotions.com/NEW/index.php
> 
> This link... you'll see that the rollover effects on the top menu DO NOT
> work. The external JS file (called: jsstuff.php) has code that looks
> like:
> 
> img1on = new Image();   img1on.src = "<?php echo $base_url;
> ?>Graphics/<?php echo $img_home_on; ?>";

$base_url and $img_home_on have no value in jsstuff.php thus you
have a javascript that results in:

   img1on.src = "Graphics/"

Also, you should also send a javascript header with the jsstuff.php
file:
  header('Content-Type: application/x-javascript');

Curt
-- 
The above comments may offend you. flame at will.

-- 
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