I think I'm having a scope issue. Here's what is going on:
I have a .php file that I'll call "x.php" that is including a full HTML page, header and all. I have an external javascript file linked in this HTML (it's actually a PHP file that outputs my javascript). However, I have a function in this external javascript file that is using PHP to reference a variable from x.php. However, the variable is empty and it seems that I can't access the variable from x.php even though all of this code is in the same PHP file.
Can external Javascript sheets written with PHP not access PHP variable from the page it's link to? If not, is there a way to work around this?
Any help is appreciated. Thanks.