I downloaded your Auto-complete code sample from "http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=8020&av=41368" to implement an on-line translator. I would like to know how to implement auto-complete control with external js file?
One suggested given for this code is to create a new instance of actb(). If you want to modify the array after it has been saved, be sure to capture the returned object:
var customarray_description = new Array();
var obj_description_school = new actb(document.getElementById('school'), customarray_description);
var customarray_code = new Array();
var obj_code_school = new actb(document.getElementById('school'), customarray_code);
obj_description_school.actb_keywords = a_different_customarray_description;
Changing the color hides the dropdown highlighting, but what I am seeking is something different.
If my list was populated with "Item1", "Item2", "Item3", and I type in "Item" then press [Enter], the script Automatically auto-completes the text in the textbox to become "Item1", as "Item1" gets highlighted BY Default (AS it is the first entry in the list).
I would like to perform a search for "Item". So I would like to type in "Item" then [Enter], without automatically selecting the first highlighted item in the list, in this case "Item1" gets selected and the action is performed.
Pretty much, how can I Modify the script SUCH that NO items are selected by default. I think this would solve my issue.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Set connString = Server.CreateObject("ADODB.Connection")
set objRS = Server.CreateObject("ADODB.Recordset")
mySQL = "SELECT * FROM Companies"set objRs = connString.Execute(mySQL)
If NOT objRs.EOF OR NOT objRs.BOF Then
GetPDFsArray = objRs.GetRows()
GetPDFsArray = ""
arrPDFs = GetPDFsArray
If isArray(arrPDFs) Then
for i=0 to uBound(arrPDFs,2)
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<input type="text" name="pdfDesc" id="pdfDesc" autocomplete="off" />
As I said the page loads, but the autocomplete does nothing.
Thanks in advance to anyboby that takes the time to read this.
hello, I have been using this great code for a while now. Recently however, I stumbled into one little problem related to this autocomplete control. Up until now, the control only allow more than one keywords for search if the words are typed consecutively. for example if we type "apple bee" the result will only show "apple bee cat", "apple bee dog", etc.
is there any possible way to let the control also show "apple frog bee".
thanks for any help
Last Visit: 31-Dec-99 18:00 Last Update: 21-Sep-17 15:54