Hi all,

I'm trying to get a jquery autocomplete to work with a remote cfc call and 
a returnformat of json. I can't seem to figure out why the return includes 
a script tag in the source...

example:

["100-5415156-11"]<script>
</script>


Is there a fix or workaround for this?

Here's my code...

<cfcomponent>
 <cfsetting showdebugoutput="false">
 <cffunction name="checkPartNumbers" access="remote" output="false" 
returntype="array" returnformat="json">
 <cfargument name="searchPhrase" type="string" default="" />
 <cfquery name="qry_checkPartNumbers">
select distinct partNumber
from parts 
where upper(partNumber) like '%#ucase(searchPhrase)#%'
</cfquery>
 <cfset returnstring = arraynew(1)>
 <cfloop query="qry_checkPartNumbers">
                    <cfset arrayappend(returnstring, 
qry_checkPartNumbers.partNumber) />
                </cfloop>
 <cfreturn returnstring />
 </cffunction>
</cfcomponent>

Called directly like 
so... 
http://localhost/components/inventory.cfc?method=checkPartNumbers&returnformat=json&searchPhrase=100


Any help?

Jon

-- 
-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Open 
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to