Skip to main content
Gene_Godsey
Inspiring
January 8, 2008
Question

CFC Not Found Error

  • January 8, 2008
  • 1 reply
  • 441 views
I get a CFC Not Found Error with this.
--------------------------------------------------------
<cfcomponent displayname="CF8 Test Data" output="false">
<cffunction name="lookUpEmployees" access="remote" returntype="string" hint="Look up method for ajax auto-suggest.">
<cfargument name="search"
type="any"
required="true"
default="">

<!--- Define the variables --->
<cfset vardata = " ">

<!--- Do the search. --->
<cfquery name="data" datasource="northwind" dbtype="ODBC">
select (FirstName + ' ' + LastName) as WholeName
from employees
where Upper(FirstName) Like Upper('%#ARGUMENTS.search#%'')
or Upper(LastName) Like Upper(%'#ARGUMENTS.search#%'')
order by FirstName
</cfquery>
<cfreturn ValueList(data.WholeName)>
</cffunction>
</cfcomponent>
--------------------------------------------------------

--------------------------------------------------------
<cfparam name="postback" type="numeric" default="0">

<cfform action="#cgi.script_name#?postback=1">
<Table align="center">
<tr>
<td colspan="2">Find an Employee</td>
</tr>
<tr>
<td>Movie:</td>
<td>
<cfinput type="text"
name="employee"
autosuggest="cfc:data.lookUpEmployees({cfautosuggestvalue})"
size="30"
maxlength="100">
</td>
</tr>
<tr>
<td colspan="2"><cfinput type="submit" name="searchit" value="search"></td>
</tr>
</Table>
</cfform>

<cfif postback eq "1">
<div align="center">
<cfoutput>
#form.employee# <br>
</cfoutput>
</div>
</cfif>
--------------------------------------------------------
    This topic has been closed for replies.

    1 reply

    Inspiring
    January 8, 2008
    This may be a bug. See the comments of this post (11/16/2007):
    http://www.forta.com/blog/index.cfm/2007/5/31/ColdFusion-Ajax-Tutorial-1-AutoSuggest