Utility Function: IncludeScript()
- October 27, 2008 5:30 AM
- ColdFusion, Utility Function
- Comments (0)
I use this one to dynamically include JS I need for a specific page. Its really just a specialized wrapper for <cfhtmlhead/> but I like it better.
<cffunction name="IncludeScript" access="public" output="false" returntype="void">
<cfargument name="script" type="string" required="true" />
<cfhtmlhead text="<script type=""text/javascript"" src=""#arguments.script#""></script>" />
<cfreturn />
</cffunction>