javascript files with php code |
There are a few different ways to handle this - each have their pros and cons. It depends on preference and your specific requirements really.
This is a great post to refer to for information on each: http://stackoverflow.com/questions/23740...javascript I generally do what others have suggested. I have a single <script> element in my <head> which contains all variables I need echoed into JS, which I can then reference anywhere in my other JS files. I use this mostly for language lines, but it has other uses too. |
Messages In This Thread |
javascript files with php code - by Lykos22 - 10-02-2015, 09:02 AM
RE: javascript files with php code - by davicotico - 10-02-2015, 12:08 PM
RE: javascript files with php code - by freddy - 10-02-2015, 08:14 PM
RE: javascript files with php code - by JayAdra - 10-02-2015, 08:24 PM
RE: javascript files with php code - by Lykos22 - 10-15-2015, 08:27 AM
|