> Are you specifying the return type in your function call or are you > pulling it out of the default WDDX Packet? > > Your output looks like its being returned as javascript escaped JSON. > For example, the following using returntype=json, yields the correct > raw JSON array: > > URL: http://localhost/tests/jsonTest. > cfc?method=giveMeJson&returnformat=json > > Component: > > component displayname="JSONTest" output="false"{ > > remote array function giveMeJson(){ > var a = arrayNew(1); > arrayAppend(a,"Miami Area Geriatric Education Center"); > arrayAppend(a,"Miami Children's Hospital"); > arrayAppend(a,"Miami Research Associates"); > arrayAppend(a,"Miami University (Oxford, Ohio)"); > arrayAppend(a,"Miami Valley Hospital"); > arrayAppend(a,"Miami, FL-546"); > arrayAppend(a,"University of MiamiJackson Health System"); > > return a; > > } > > } > > Result (which is exactly what should be returned by the request): > ["Miami Area Geriatric Education Center","Miami Children's Hospital", > "Miami Research Associates","Miami University (Oxford, Ohio)","Miami > Valley Hospital","Miami, FL-546","University of MiamiJackson Health > System"] > > Is the string your provided the response from Firebug, an echo of the > var in javascript or what you see as the browser source when you > navigate directly to it? If so, are you using JQuerys native . > getJSON() method? That should give you an immediately workable JS > array. > > HTH, > Jon > > > On Nov 19, 2013, at 12:36 AM, Torrent Girl <[email protected]> > wrote: > > > > > This is what my response looks like: > > > > //"\/\/[\"Miami Area Geriatric Education Center\",\"Miami Children's > Hospital\",\"Miami Research Associates\",\"Miami University (Oxford, > Ohio)\",\"Miami Valley Hospital\",\"Miami, FL-546\",\"University of > Miami\\\/Jackson Health System\"]" > > > >
Ok I read about this on one of my many 1,000 google searches for this subject and someone mentioned using returnformat=plain. I tried that and I get the data back in the correct format: /contentfiles/ajaxlookup.cfc?method=getInstitutions&returnformat=plain&term=Miami //["Miami Area Geriatric Education Center","Miami Children's Hospital","Miami Research Associates","Miami University (Oxford, Ohio)","Miami Valley Hospital","Miami, FL-546","University of Miami\/Jackson Health System"] BUT I still don't get the autosuggest drop down on the form. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:357112 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

