[thelist] External Javascript files + PHP

Andrew Forsberg andrew at thepander.co.nz
Wed Oct 24 23:54:53 CDT 2001

Hi All

Maybe I'm doing something entirely too stupid, but, I can't seem to 
get a external javascript file, linked via the src="foobar.php" 
attribute of a <script> tag, to work when there's php code in the 
external javascript file. i.e., the external file has a few <?php 
blah blah blah ?> lines in it which I'm using to populate a 
javascript array with data from a MySQL table.

Has anyone had to do this before? I keep getting javascript source 
code errors whenever I attempt it.

I'd much rather not have all this junk filling up the header of every 
page on the site, but inline javascript in the html header seems to 
be the only way that works at the moment.


Andrew Forsberg
uberNET - http://uber.net.nz/
the pander - http://thepander.co.nz/

More information about the thelist mailing list