LyndonOHRC
Programmer
Googled this for several hours, hope I'm missing the obvious as usual...
I'm using CF9 and IIS7. Followed/tailored simple autosuggest code from Ben Forta.
Came up with HTML:
and a CFC named employer.cfc in the current template folder:
The query runs fine in a test cfm file.
Any help appreciated.
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
I'm using CF9 and IIS7. Followed/tailored simple autosuggest code from Ben Forta.
Came up with HTML:
Code:
<cfinput type="text" name="Employer" size="50" autosuggest="cfc:employer.lookupEmployer({cfautosuggestvalue})">
and a CFC named employer.cfc in the current template folder:
Code:
<cfcomponent output="false">
<cffunction name="lookupEmployer" access="remote" returntype="array">
<cfargument name="search" type="any" required="false" default="">
<cfset var data="">
<cfset var result=ArrayNew(1)>
<cfquery name="data" datasource="Binkley">
Select lname
From tdLicense
Order By lname
</cfquery>
<cfloop query="data">
<cfset ArrayAppend(result, lname)>
</cfloop>
<cfreturn result>
</cffunction>
</cfcomponent>
The query runs fine in a test cfm file.
Any help appreciated.
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey