One of my pet peeves … entering my state is sometimes easy and efficient and other times more difficult.
Sometimes I enter M and I and MI is the result, even with a drop down menu. Sometimes I enter M ( and the form goes to the first M) and then when I enter I it goes to Idaho!!!
Is there a good reason why a good programmer would allow this to happen?
I think the question is more like ‘is there a reason why a good programmer would keep this from happening?’
Most ‘off-the-rack’ drop boxes (as it were) are not designed to automatically position themselves based on a multiple character string typed in… which is what they’d have to do for you to type ‘o’,‘n’ and end up on ontario instead of nebraska or wherever. I’ve written a custom java dropbox that would do that sort of thing, and it gets complicated, especially in the details. (What happens if the user wants to ‘backspace over’ what he’s typed and start again? if he types ‘o’, ‘r’ and there’s nothing that starts with those letters, do I stay at ob? move down to os? flip over to ra??)
This sort of customization isn’t usually something that the people paying the bills care about. In some situations (like webpage form dropboxes) it just isn’t possible.
And a lot of people by now are used to the ‘repeat the first letter over and over until I get what I want’ strategy which works with simpler drop boxes.
Hope this information helps you understand a little.
I’m not quite sure what you’re having problems understanding I admit. State boxes might be pretty common, but probably not common enough that it’s worth designing something very fancy for only two characters. Let’s go over the common alternatives in a programmer’s toolbox.
1- simple two character wide textbox. To me, this is really a very good way of entering state abbreviations. It doesn’t have any fancy GUI list to pick from, but if you want to just type in MI and get MI, this will get it done.
2- combo boxes. This would be another good alternative. Basically this is a textbox and a drop box in the same place. They don’t really work together… you can either type MI or pick something out of the list, but normally when you type something it won’t scroll to that place in the list… unless you type the whole thing in, and then maybe they will… I’m not sure. It definitely won’t jump to ‘michigan’ based on mi.
Unfortunately, the makers of the HTML specifications for web forms have never seen fit to include anything with combo-box like functionality, (unless you count a fully seperated textbox and drop box.) That’s a pity.
3- standard drop boxes. These will really do very well for getting you to the right option, based either on mouse click or keyboard input, as long as you drop the requirement that you be allowed to use the intuitive keyboard strategy. Type M once and you’ll get maine. Type it again successively and you’ll get maryland, massachussets and finally michigan… or maybe in some order if whoever wrote the drop box put the postal abbreviations like MI at the front of the listings. This is behavior that is easy for a programmer to code, easy for a user to learn to live with if he resigns him/herself to adapting to the computer a little bit, and will work for a HUGE number of possible applications.
Another consideration is that it’s hard to establish a standard and flag to a user that something will respond to keyboard input in a different way. If I coded a state box that would work your way, and someone started searching through the M’s the old way… well, it would search for MM and not find any state starting with those two letters. And trying to get the same box to work BOTH ways, even for states… well, take my word that that would be a major headache.
I’m sorry if none of this is a particularly satisfying explanation for you. But it’s all I can think of. Any other geeks want to chime in at this point??
I’ll add that if you’re working in an environment that gives programmers the option to customize the tools they’re working with, (vb, java, C# for example,) it isn’t really that hard to come up with this sort of functionality… it’s just never really become the standard.
[geeker rant]
What really fries me off is when there are drop boxes that don’t respond to keyboard input at all, like the drop box of possible file types in winXP search. (That probably has to do with the fact that they just HAD to include the little icons next to each filetype description, and the dropbox with graphic support doesn’t include standard keyboard inputs since it doesn’t know how to match keys against graphics.
[/geeker rant]
In case you’re interested, I found that java code I remembered having written… which isn’t really all that long. Take a look if you’re interested.
// reacts to key events by paging through the list.
public void processKeyEvent (KeyEvent ke) {
if (ke.getID() == KeyEvent.KEY_PRESSED) {
char c = ke.getKeyChar();
if (c >= ' ' && c <= '~') {
t += c;
t = t.toLowerCase();
for (int i = 0; i < getItemCount(); i++) {
if (getItem(i).toLowerCase().startsWith(t)) {
select(i);
return;
}
}
// if not returned at this point, substring not found.
t = "" + c;
t = t.toLowerCase();
for (int i = 0; i < getItemCount(); i++) {
if (getItem(i).toLowerCase().startsWith(t)) {
select(i);
return;
}
}
t = "";
}
}
super.processKeyEvent (ke);
}
But it’s much easier to just do it in HTML. When you have a dropdown list, it will go to the first instance of the letter typed. Typing the letter again, you go to the next instance.
I live in NY, which is last on the list of N’s, so I just press N until I get to it. Not an issue.
After reviewing the question and answers, it occurs to me that I don’t know what type of interface “What the … !!!” is talking about. HTML forms do it one way (I assume but don’t know for sure that all major browsers handle it the same way), but a custom-code program will do it whatever way it wants.
Is the OP referring to experiences that span HTML web pages, Java applets, Windows programs, etc., and wondering why they don’t all do it the same way?
The question raises the broader issue of “Why does different software do the same thing in different ways?” Some programs have predictive fields where the program tries to guess what you’re going to type based on the first few letters (usually comparing it to what you’ve typed in the past–Quicken is the classic example, or IE URLs). The developers all make different tradeoff decisions based on what they believe are the user’s requirements. There are rarely standards for how user interfaces behave. Standards are usually developed for interfaces between components. There is a de facto standard for Windows interfaces (what menu items should be present, how they should behave) but there is nothing to prevent someone with what they think is a better idea from doing it differently.
Thanks for the tip on hitting M multiple times until I get to MI
Here is an example of what I was talking about. Go to the website below and look at the month field. The options are 01, 02… 12. If you enter 0 you got to the first 0 … if you then enter 1 you go to 10 instead of staying at 01.
Not a big deal but remember my OP was with regard to the two-digit state entry which I still think has got to be one of the most common drop-down fields out there.
IE goes to the first instance of the initial letter you type. If you hit a second letter, it goes to the first instance of that. ME but then ID.
FireFox and its ilk react to the whole “word” that you type - but only if the list is in alphabetical order. Typing “MI” will get you MI, unless there’s something in the dropdown list that is out of order, such as “Enter state code” at the top.