• View
  • Source
The js link "includes/Spry/widgets/autosuggest/SpryAutoSuggest.js" is included in html head.

Handler

<cffunction name="dspLoadJS" access="public" returntype="void" output="false">
    <cfargument name="Event" type="coldbox.system.beans.requestContext">
    <cfset var spry = getPlugin("Spry",true)>
    <cfset var jsLink = spry.getSpryRelativePath() & "/widgets/autosuggest/SpryAutoSuggest.js">
    <cfset spry.setJSLink(jsLink)>
    <cfset Event.setValue("jsLink",jsLink)>
    <cfset Event.setView("spryExample/loadJS")>        
</cffunction>

View

The js link "<cfoutput>#Event.getValue("jsLink")#</cfoutput>" is included in html head.