Thanks
The list creation does exactly what I need it to but the <cfoutput... does
work.
It's not giving an error but the autocomplete does nothing.
> I would suggest doing this way :
>
> <cfquery name="myQuery">your query here</cfquery>
> <cfset myList = "[" & ListQualify(ValueList(myQuery.NameofField),'"',',
> ','all') & "]">
>
> So you have a list in the same format as your example here below;
> Then you just replace the list (with [ and ]) by
> <cfoutput>#myList#</cfoutput> in the script
>
> Theer are other ways of doing this I'm sure, but that's the one I
> would use to go faster
>
> Stéphane
>
>
> > I am trying to use jquery code provided by one of the online samples.
>
> >
> > The code is below. As you can see the city list is hard coded. I am
>
> > wondering if I can create my own searchable list from query results
>
> > and replace the list below with my new list.
> >
> >
> > Thanks for any suggestions.
> >
> >
> > <script type="text/javascript">
> > $(document).ready(function() {
> > $("#country").autocomplete(
> > "data/country.cfm",
> > {
> > minChars:2,
> > delay:200,
> > autoFill:false,
> > matchSubset:false,
> > matchContains:1,
> > cacheLength:10,
> > selectOnly:1
> > }
> > );
> > $("#city").autocompleteArray(
> > ["1","2","3","Brighton and Hove","Bristol",
> >
> > "Cambridge","Canterbury","Carlisle","Chester","Chichester",
> >
> > "Coventry","Derby","Durham","Ely","Exeter","Gloucester",
> "Hereford",
> >
> > "Kingston upon
> > Hull","Lancaster","Leeds","Leicester","Lichfield",
>
> > "Lincoln","Liverpool","London","Manchester",
> "Newcastle-upon-Tyne",
> >
> >
> > "Norwich","Nottingham","Oxford","Peterborough","Plymouth",
> > "Portsmouth",
> >
> > "Preston","Ripon","Salford","Salisbury","Sheffield",
> "Southampton",
> >
> > "St
> > Albans","Stoke-on-Trent","Sunderland","Truro","Wakefield",
> > "Wells",
> >
> > "Westminster","Winchester","Wolverhampton","Worcester","York"],
> > {
> > minChars:1,
> > delay:10,
> > autoFill:true,
> > matchSubset:1,
> > matchContains:1,
> > selectOnly:1
> > }
> > );
> > });
> > </script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322880
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4