PDA

View Full Version : Javascript included in PHP?


Aasixx
10-29-2012, 06:45 PM
I have a PHP code that requires Javascript to run. I have the Javascript code but I'm confused on how to make the Javascript code work with the PHP code. Do I add <script type="text/javascript" src="/javascriptnamehere.js"></script> in the PHP code and if so, where? It would be really helpful if someone could explain that to me. :)

Aasixx
10-29-2012, 09:32 PM
Nevermind. I got it to work. :)

Hall of Famer
10-30-2012, 02:46 AM
Glad you figured it out, the most common location to insert javascript is your template html file. The js file can be included in the header.