Skip to content

Instantly share code, notes, and snippets.

@tdm00
Created August 30, 2012 13:41
Show Gist options
  • Select an option

  • Save tdm00/3528760 to your computer and use it in GitHub Desktop.

Select an option

Save tdm00/3528760 to your computer and use it in GitHub Desktop.
Disable debugging output for JSON calls for AJAX
<cfcomponent extends="Controller" output="false">
<cffunction name = "init">
<cfset Super.init() />
</cffunction>
<cffunction name = "remotesearch">
<cfsetting showdebugoutput="false">
<cfset provides("json")>
<cfif IsDefined("params.term") and Len(Trim(params.term)) GT 0>
<cfset locations = model("Location").findAll(where="zipcode LIKE '#params.term#%'", order="zipcode DESC", include="state")>
</cfif>
<cfset renderWith(locations)>
</cffunction>
</cfcomponent>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment