I have a CF8 autosuggest setup for selecting a user on a form.  The input tag 
is:

<cfinput type="text" name="sendto" 
autosuggest="cfc:ajax.getAddressBook({cfautosuggestvalue})">

And the query inside the getAddressBook() method looks like this:

<cfquery name="qryClients" datasource="mydsn">
SELECT first, last, email FROM clients
WHERE first LIKE <cfqueryparam value="#Arguments.autosuggestvalue#%" 
cfsqltype="CF_SQL_VARCHAR">
OR last LIKE <cfqueryparam value="#Arguments.autosuggestvalue#%" 
cfsqltype="CF_SQL_VARCHAR">
OR email LIKE <cfqueryparam value="#Arguments.autosuggestvalue#%" 
cfsqltype="CF_SQL_VARCHAR">
</cfquery>

I then return an array whose entries look like "#first# #last# #email#".

This returns users whose first name, last name, or email address starts with 
the text the user has entered in the form field. I've called it via URL and its 
returning the correct results.  If I give it "Smi" for an autosuggestvalue, it 
returns "Joe Smith [EMAIL PROTECTED]".

But the auto suggest values shown on the form are only the ones with a *first 
name* starting with the auto suggest value.  Its as if the CF code on the 
client is further filtering the results returned from the CFC.     

I didn't see anything in the docs about the client side auto filtering, but it 
looks it is doing just that???

-Ryan



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300267
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to