Welcome Guest, Not a member yet? Register   Sign In
Neat development using CI and YUI
#2

[eluser]Natebot[/eluser]
I wouldn't put your javascript files in with your controllers. I would only expect to find controllers (that is, php files, each with one class that extends the Controller class) in the system/application/controller directory.

I would expect web assets like html, images, css, and javascript to have their own directory structure in the web root and away from the framework and application files. In fact I would recommend putting your system and application files outside the web root.

Ideally your web assets are agnostic in regards to what framework or even language is used in your Web application's back-end.

Having said that, I guess it is possible to do so. If your system and application directory is in the web root you should be able to point directly to the js file in your view with:
Code:
<script src="/system/application/controllers/javascriptfile.js" language="javascript"></script>

Also, I am not sure what you mean by "a JS file for the Controller" - since javascript is a client-side technology, you won't be using it in your actual controllers.


Messages In This Thread
Neat development using CI and YUI - by El Forum - 02-05-2009, 04:29 PM
Neat development using CI and YUI - by El Forum - 02-06-2009, 05:52 AM
Neat development using CI and YUI - by El Forum - 02-06-2009, 11:26 AM
Neat development using CI and YUI - by El Forum - 02-06-2009, 11:38 PM
Neat development using CI and YUI - by El Forum - 02-07-2009, 01:11 AM
Neat development using CI and YUI - by El Forum - 02-08-2009, 06:36 PM
Neat development using CI and YUI - by El Forum - 03-26-2009, 04:09 PM
Neat development using CI and YUI - by El Forum - 03-26-2009, 07:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB