select box filtering in javascript

I am using some select box filtering javascript code from mattjp88 (exhange expert), which is nice to help resolve a data entry efficiency situation. However, the select box filtering does not always work within the drop-down after the first time usage. It works within the dropdown field consistently before the dropdown is perform or if you perform a double click on the field. Below is the javascript I am using and a portion of the form code that is used wihin the select box. The code provided by matt kruse is reacting the same way. Can someone help resolve this issue and help explain why this is happening? Does the browser treat the select box drop-down different from the value in the field?

I am trying to allow a user to use keystrokes for filtering/choosing names on a drop-down list. The problem I am having, is that the javascript I provided does the filtering successfully, if you perform the filter without doing the dropdown. If you do the dropdown, on occassion the filtering does not work. An example of it not working can be shown using the code below. If you click the dropdown to display the list of values, and then type "bloc", "cat" will be chosen, when I want "block" to be chosen.

Based on your latest example, the problem is exactly that. Keystroke filtering does not work for a drop down list, as that is only in the options list of the drop down menu. You are looking for --

"matched = true;"

and that NEVER happens unless ALL the keystrokes match ALL of the letters in the drop down menu. So in your example, "bloc" does not match "block" or "blog" because it is not a complete match of all characters for the field. Hence it defaults to the next entry, which is an error in the code. In other words, the routine you are using cannot match the options list unless it takes **ALL** keystrokes first, and then on the ENTER key, it then looks for a match. You will need to rewrite the logic of the routine for a drop down menu, as instantaneous attempts at matching one character at a time will not work. Good luck.

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…

This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.
Login to your Google Account, then Google for "Google M…