On Jun 17, 9:37 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
Peter Michaux said the following on 6/17/2007 5:23 PM:
On Jun 17, 7:32 am, grou...@reenie.org wrote:
When you press the down key while in an input field the default
behavior for some event creates a dropdown of the previously input
text.
What event creates that behavior and how do I stop it ?
This is a browser feature. Presumably the user chose the browser
because the browser's features are appealing. Yes some of these
browser features are aggravating at times. It isn't really a good idea
to be trying to change how the browser works. I don't know if you can
even have any affect on this situation.
It is an auto-fill feature and no, you can't have any effect on it's
behavior.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
Ok thanks. I found out I can trick the autocomplete into not appearing
by having a start value of ' '. The autocomplete doesn't seem to work
at all if the first letter is a blank, even if previous searches
started with a blank. After that it will only appear if the user
deletes everything in the field, which doesn't usually happen, so it
effectively solves the problem.
The input field is for text to search for in an associated drop down,
to make it easier to find the right item in the dropdown. As each
letter is entered the selection moves to the correct choice in the
dropdown. In other words, it acts like autocomplete but instead of
adding the finished text to the input field, it hilights the finished
text in the dropdown. The default autocomplete just gets in the way.
I just have to make sure the search for the right item can work even
if the first letter is a blank, plus it must ignore the blank. But all
that was easy because all the search does is check to see where the
text lands alphabetically in the select list, and this automatically
ignores the spaces. In other words, " ABC" is effectively the same as
"ABC"
This is not for web customers, it is for people who spend all day on
the page filling phone orders. I'm trying to eliminate as many
keystrokes as possible, and the autocomplete takes an extra mouse
click to get rid of it.