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]

 



Aaron Wolski wrote:
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; ?>";

As you can see, the difference between the two is the fact that the
image FILE NAME is hard coded into the file as opposed to calling.


https://celestica.tristarpromotions.com/NEW/index3.php

This link... you'll see that the rollover effects work as well. Instead
of having an external file I have embedded the JS code directly into the
page.

Additionally, I have use code that looks like:

img1on = new Image();   img1on.src = "<?php echo $base_url;
?>Graphics/<?php echo $img_home_on; ?>";


Having visuals... does that help communicate what the problem is?

Yes, the output of your JavaScript in the second example is missing $img_home_on (it's outputting nothing). Where does this variable get set? How about posting the php code for https://celestica.tristarpromotions.com/NEW/jsstuff.php



-- By-Tor.com It's all about the Rush http://www.by-tor.com

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