473,698 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simulating "Auto Complete" with Javascript

Hi All,
I'm looking for a script which monitors each keystroke in an input text
field and compares it to the contents of an array of strings and displays
the first matching element as the user types.

In other words, something which works very much like the Windows
"Autocomple te" feature.

Has someone invented this wheel? Thanks.

Vern
Jul 23 '05 #1
2 1651
Vern wrote:
Hi All,
I'm looking for a script which monitors each keystroke in an input text
field and compares it to the contents of an array of strings and displays
the first matching element as the user types.

In other words, something which works very much like the Windows
"Autocomple te" feature.

Has someone invented this wheel? Thanks.
Vern


Matt Kruse has a nice example (among many others) here:

http://www.mattkruse.com/javascript/...ete/index.html

Jul 23 '05 #2
Thanks, Mscir! Just what I was looking for.

Vern

"mscir" <ms***@access4l ess.com.net.org .uk> wrote in message
news:10******** *****@corp.supe rnews.com...
Vern wrote:
Hi All,
I'm looking for a script which monitors each keystroke in an input text
field and compares it to the contents of an array of strings and displays the first matching element as the user types.

In other words, something which works very much like the Windows
"Autocomple te" feature.

Has someone invented this wheel? Thanks.
Vern


Matt Kruse has a nice example (among many others) here:

http://www.mattkruse.com/javascript/...ete/index.html

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
20504
by: John Baker | last post by:
Hi: I know this is a strange question, but I have inherited a system where files are copied and records re auto numbered (as an index field) )frequently, and I am wondering how high the number can go without the system crashing. An ancillary question is how one resets an auto number so that the sequence starts again at 1. In the case of this file, the auto number field serves no useful purpose except as an
1
2480
by: PL | last post by:
The Culture="auto" UICulture="auto" is a great idea, but how do you handle the situaion where SQL Server always requires a dot "." in numeric values. If I use Culture="auto"so that dates and numbers are formatted depending on the browser settings I will encounter situations where values come in as for example "52,50" using a comma instead of a dot. I could go over the whole site and make sure I replace any commas with dots before...
1
4055
by: Jefferds.A | last post by:
Hi, I'm putting together a little database of individuals categorized by family. I have two lists, one that contains family names and one that contains individuals' names. When you click on a link in the first list, it generates from a mysql database all the people associated with that family. When you click on an individual's name, it displays biographical information. The catch is, for space, I've put these lists in little boxes...
9
18849
by: Beowulf | last post by:
I was having this problem: http://groups.google.com/group/microsoft.public.sqlserver.server/msg/e36e423972323378?dmode=source with it taking an inordinate amount of time to enumerate the databases on my local SQL Server instance, so I went through all the local databases and unchecked "Auto Close" on the "Options" tab of the Database properties in Enterprise Manager. This cleared up the problem nicely. In EM or through SQL-DMO, the...
22
3067
by: nospam_news | last post by:
I currently get asked about my usage of "auto". What is it for? The keyword is clearly superflous here. In contrast to the huge majority of C/C++ developers I write definitions very explicitly like that: int main(char argc, char *argv, char *env) { try { auto Exception mainException(1); mainException.setErrNo(42);
2
3075
by: Piotr K | last post by:
Hi, I've encountered a strange problem with Firefox which I don't have any idea how to resolve. To the point: I've <divelement with a style "height: auto" and I want to retrieve this value ("auto") in JavaScript - however instead of getting "auto" value, I get calculated height. In IE and Opera it simply returns "auto". Any ideas how to check in Firefox if element height was set to "auto" ? I'll be grateful for any help.
1
3090
by: mattmao | last post by:
I am doing a ASP.NET porject, inside a asp control tag there are some textboxes for users to input data. Later they can take previously entered data out of those textboxes. To provide better UI efficiency, I would like to use JavaScripts to support "auto" copy to clipboard, but I don't know how to achieve that? Here is my code stub: <script type="text/javascript"> var input = document.getElementById("<%=txtUser.ClientID%>").text;...
3
17245
by: Simon van Beek | last post by:
Dear reader, What can be wrong in my ComboBox, the property "Auto Expand" is set to Yes, but by typing in the ComboBox it doesn't expand. Is this because the source of the ComboBox is a query.
0
9161
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8897
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.