The attached code shows that I am updating a select list from a query. However,
I need to revise the list every time the user type into the company box
(thereby giving them a company name to select). I think I need to do the query
in javascript and not CF.

<script language="JavaScript" type="text/javascript">
function doFilter(pattern, list){

if (!list.bak){
list.bak = new Array();
for (n=0;n<list.length;n++){
list.bak[list.bak.length] = new Array(list[n].value, list[n].text);
}
}
match = new Array();
nomatch = new Array();
for (n=0;n<list.bak.length;n++){
if(list.bak[n][1].toLowerCase().indexOf(pattern.toLowerCase())!=-1){
match[match.length] = new Array(list.bak[n][0], list.bak[n][1]);
}else{
nomatch[nomatch.length] = new Array(list.bak[n][0], list.bak[n][1]);
}
}
for (n=0;n<match.length;n++){
list[n].value = match[n][0];
list[n].text = match[n][1];
}
for (n=0;n<nomatch.length;n++){
list[n+match.length].value = nomatch[n][0];
list[n+match.length].text = nomatch[n][1];
}
list.selectedIndex=0;
}
</script>


<cfparam name="executive" default="">
<cfparam name="jobagent" default="">
<cfparam name="resume" default="">
<cfparam name="contract" default="">

<cfform action="signup3.cfm" name="form" height="600" width="680"
format="html" preservedata="Yes">
<div class="d2" align="center">BASIC INFORMATION</div><br>
<br>



<cfquery name="Compquery" datasource="taxtalentdb" dbtype="ODBC"
username="tax-talentdata" password="tony12">
SELECT Top 10 Company_Name,Company_City FROM cstatic WHERE Company_Name LIKE
'%excompany%'
</cfquery>

<table width="100%">
<tr>
<td width="15%" nowrap="nowrap"><strong><font size="+1"
color="orange">&raquo;</font>Current Company</strong></td>
<td width="35%"><cfinput type="text" name="excompany" required="Yes"
label="Current Company:" message="Current Company is a required field."
width="300" tabindex="" onkeyup="doFilter(this.value,this.form.CompSelect) "
onchange="doFilter(this.value,this.form.CompSelect )"/>
<cfoutput query="Compquery">
<select name="CompSelect">

<option value="#Company_Name#" & "* " & "#Company_City#">#Company_Name# *
#Company_City#</option>

</select></td>
</cfoutput>