I have a main index.php and it has an external js included.
The navigation in my site is always stays in index and including the relevant php file.
I also have a js file that i want it to only affect a certain php file (if i include it in the index.php it affects all the php files). when i try to include in a file called 'welcome.php' it doesn't work. The js is right because i tried putting the code in the index.php and it worked.
this is how i included it in 'welcome.php'
</div>
</div>
<script src="../js/content.js" type="text/javascript"></script>
</body>
if it's working when you type it in directly but not when echo'ing it then it's because you're not escaping qoutes correctly
try
<script src=\"../js/content.js\" type=\"text/javascript\"></script>