LyndonOHRC
Programmer
I'm trying to figure out how to use autosuggest populated with ajax in a cfform. I have Ben Forta's example and slightly modified it to fit my needs. I get a javascript error "exception thrown and not caught" on line 799 of the client document, yet the client file only has 640 lines? The error comes in focus after the first character is typed in the text box and the autosuggest never populates.
I'm on a dedicated windows 2008 server with CF8. Any help appreciated.
CFC File:
HTML File:
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
I'm on a dedicated windows 2008 server with CF8. Any help appreciated.
CFC File:
Code:
<cfcomponent hint="Owner database functions">
<cffunction name="lookupOwner"
access="remote"
returntype="string"
hint="Lookup method for Ajax auto-suggest">
<cfargument
name="search"
type="any"
required="false"
default="">
<cfset var data="">
<cfquery datasource="HDRegistry" name="data">
SELECT OwnerName
FROM Owners
WHERE UCase(OwnerName) LIKE UCase('#ARGUMENTS.search#%')
ORDER BY OwnerName
</cfquery>
<cfreturn ValueList(data.OwnerName)>
</cffunction>
</cfcomponent>
Code:
<br><br>
<cfform>
Owner:
<cfinput type="Text"
name="OwnerName"
autosuggest="cfc:CFCFile.lookupOwner({cfautosuggestvalue})"
size="50"
maxlength="100">
<cfinput type="submit" value="Search" name="submit">
</cfform>
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey