[thelist] include a php file via javascript

Ken Kogler ken.kogler at curf.edu
Sun Dec 8 20:26:01 CST 2002


I've done this with ASP/CSS -- using ASP to dynamically construct a CSS
file and send it to the client.

As long as you're setting the correct MIME type ("text/javascript" in
this case) in the PHP file, the client won't know the difference.

Since I know nothing about PHP, you'll have to check the PHP docs to
find out how to set MIME types...

You're halfway there. :)

--ken

> Instead, I'd like to include a .php file like this:
> <script language=javascript src="javascript/menu.php"
> My concern is that it might break on some browsers.




More information about the thelist mailing list