[thelist] External Javascript files + PHP
Andrew Forsberg
andrew at thepander.co.nz
Thu Oct 25 02:00:52 CDT 2001
>Based on your problem, I think you need to add a Content-Type header so that
>the browser respects it as a .js file.
>
><? Header('Content-Type: text/javascript')?> should do it.
Funny thing is that this sensible suggestion just makes things worse.
I'd like to have a nosey around my ISP's httpd.conf file,
specifically around the area where extensions are mapped to the php
parser, but I think I can guess what they'd say if I asked. :)
I've sorted out a rather nice php-based url-rewriting scheme -- which
is working like a dream -- but inserting the results dynamically into
the javascript variables seems to be screwing up the linked script.
The problem could very easily be related to echoing ' marks into
javascript strings. It's a bit hard to tell exactly what's choking
what without spending more time investigating. I'll have to have
another look tomorrow morning.
Thanks a lot for all your suggestions evolters!
Cheers,
Andrew
--
Andrew Forsberg
---
uberNET - http://uber.net.nz/
the pander - http://thepander.co.nz/
More information about the thelist
mailing list