Welcome Guest, Not a member yet? Register   Sign In
Loading core in JavaScript files
#1

[eluser]mariogl[/eluser]
Hi. I'm trying to migrate my site to CodeIgniter. I have doubts about how to implement my js files.

In my previous system, I include separate js files (common.js, forms.js, lists.js) depending on which controller is being called. Actually, most of them are php files (forms.js.php) that generate javascript code, because I use some php classes and constants inside. Each js.php file has a php initialization code at start, which is the same one that use all the controllers.

Now, with CodeIgniter, I don't know which is the best way to do this. What I want is that those javascript files (included by <script src=...) load the core and all my initial stuff, that I have put in MY_Controller.

I've searched, I've read about render js files as views, but I can't see it clear.

Thanks for any help.


Messages In This Thread
Loading core in JavaScript files - by El Forum - 11-13-2010, 06:50 AM
Loading core in JavaScript files - by El Forum - 11-13-2010, 08:02 AM
Loading core in JavaScript files - by El Forum - 11-16-2010, 07:58 AM
Loading core in JavaScript files - by El Forum - 11-16-2010, 09:34 AM
Loading core in JavaScript files - by El Forum - 11-16-2010, 10:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB