Created
August 30, 2012 13:41
-
-
Save tdm00/3528760 to your computer and use it in GitHub Desktop.
Disable debugging output for JSON calls for AJAX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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