Click to See Complete Forum and Search --> : javascript including php


eraguet
05-02-2003, 03:59 PM
Hi,
I want to know if it is possible to include a file (.php) in a
javascript file (.js) ????
such as the php function: include()

because all my web site call a menu.js
but now i need to call a menu.php
so insted of remplacing all the menu.js by menu.php
i would prefere to "include" the .php inside my .js

thanks

pyro
05-02-2003, 04:05 PM
No, there isn't a javascript "include" and even if there were, you woudn't want to do it that way because your content wouldn't get included for the 1 in 10 users without javascript. Better of to just go through your pages and switch the include...