AutoComplete a List Menu with DataBase driven results

Posted on 2006-05-05
Last Modified: 2013-12-24
Hey again,

I got my original post to work when I tried to populate an area with the results from a query based off of each character that the user enters...but that example used CFFUNCTION tags and my production server is good old CF5 (which doesn't have that capability).

So about a list menu that is populated with the results of a query as my end user types into a text field.  So for example, as the user types into the text field, the list menu is populated with less and less exact matches.  

text field: A                     Menu List:  Acorn

with a second letter...
text field: Ap                   Menu List:  Apple


Here's the HTML of the basic idea.

<CFQUERY NAME="midata" DATASOURCE="midata">
FROM `Sheet1$`
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

<body bgcolor="#8CB4FD">
<table width="463" border="2" cellspacing="0" cellpadding="2">
    <td width="104">&nbsp;</td>
    <td colspan="3">&nbsp;</td>
    <td width="153"><input name="textfield" type="text" value="Inputted AutoCompleteText Field" size="25" maxlength="25" /></td>
    <td width="12">&nbsp;</td>
    <td width="166">
      <select name="description" size="5" class="calendarText" multiple="multiple">
          <cfoutput query="midata">
            <option value="#dd3#">#dd3#</option>
Question by:inverted_2000
    LVL 5

    Accepted Solution

    This is actually a javascript question and not a coldfusion question. What was the code you were using originally?
    LVL 2

    Author Comment

    The example that I was given before was:

    Works great...but I'm on a CF5 server )o:
    LVL 2

    Author Comment

    Can the tag CFFUNCTION be added to the tags allowed with CF5?

    That might fix me right up (o:

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
    Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now