A Facebook-Like List auto complete Using FCBKcomplete, JQuery and Coldfusion
Friday 25 February 2011 05:19 PM
FCBKcomplete is a JQuery-based, Facebook-like, AJAX-capable auto complete input file––and it’s beautiful! Click here for the demo page. Click here to download. Emposha, the brilliant dude behind this neat piece of coding, releases regular updates, so be sure to download the latest version. For this post, I’m using the most current version as of today, 2.7.4
I’m trying to create a simple ColdFusion wrapper for FCBKcomplete, write a CFC file to grab data from one of my tables, and then pass the data to FCBKcomplete. First things first, I need to include JQuery. I use JQuery on most of my web pages, so I include JQuery on top of my page in a header template. I'm not going to include JQuery in the wrapper.
Coldfusion 8 and higher are capable of returning JSON-formatted data on demand. If your version is 7 or older, you need to use cfjson.cfc. Next, here is the Keywords.cfc file. Since FCBKcomplete Ajax requests require JSON Array with the variable [caption] for a display name and the variable [value] for a value ID, I converted my query results into an array.
Your site, "Facebook Auto Like" Do not you want to add code? http://www.facebook.com/notes/matchlinkstv/sitenize-facebook-auto-like-kodu-eklemek-istemez-misiniz/169965679730597 Good Luck
I just add a demo and all the demo files in to download. Hope that helps.
It returns the ['value'] you have send from the cfc file. if the value is empty, it should return the caption text.