Hi, Need some help on this one. I couldn't get Ben Forta's autosuggest example 
to work. I had to make a virtual directory in IIS to the CFIDE folder in order 
for the button animation to work. But the icon just sits there and rotates. 
Nothing is suggested. I know that the cfartgallery is returning records. What 
am I missing? 

input_test.cfm

<cfform>
Art:
<cfinput type="text"
        name="artname"
        autosuggest="cfc:autosuggest.lookupArt({cfautosuggestvalue})">
</cfform>
 
 
autosuggest.cfc

<cfcomponent output="false">

<cfset THIS.dsn="cfartgallery">

    <!--- Lookup used for auto suggest --->
    <cffunction name="lookupArt" access="remote" returntype="array">
<cfargument name="search" type="any" required="false" default="">

<!--- Define variables --->
<cfset var data="">
<cfset var result=ArrayNew(1)>

<!--- Do search --->
<cfquery datasource="#THIS.dsn#" name="data">
SELECT artname
FROM art
WHERE UCase(artname) LIKE Ucase('#ARGUMENTS.search#%')
ORDER BY artname
</cfquery>

<!--- Build result array --->
<cfloop query="data">
<cfset ArrayAppend(result, artname)>
</cfloop>

        <!--- And return it --->
<cfreturn result>
    </cffunction>
    
</cfcomponent> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339405
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to