JavaScript & CSS Files

hi guys,

I already saved my javascript file in JAVASCRIPT folder and CSS file in CSS folder. Now issue is i don’t know how include in my view file…

We have our current application running NON-MVC Environment. Now Im trying to shift on Coldbox environment.

Currently Code:

`

CSS3 dropdown menu
  • Home
  • `

    please give me example : how can i use existing scripts in Coldbox Environment.

    • Amir -

You can include javascript and CSS files in your views and or layouts the exact same way you always have with a script tag.

If you want to get fancy, you can use the HTML Helper, but that’s not a requirement.

http://wiki.coldbox.org/wiki/Plugins:HTMLHelper.cfm#addAsset

Also, if you want to combine/minify your files, you can do that with the JSMIn Compressor

http://wiki.coldbox.org/wiki/Projects:JSMin-Compressor.cfm#minifiy()

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Thanks Brad, let me try thanks …:slight_smile:

just remember that its relative to the root of the application.