The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

To run PHP in a JavaScript file simply change the file extension on the file from .js to .php and then include the PHP in the file the same as if it were HTML. As long as the PHP actually writes valid JavaScript code that will then work.

i fixed it!!
I ended up putting the contents of the original .js file straight into the .php page instead of using the javascript include 'src' and it rendered the js and included the txt file perfectly

Sounds like you didn't set up the separate JavaScript file to be parsed for PHP first - if the code just got passed to the JavaScript instead of being run on the server that would explain why the separate file didn't work.