Using IE 7 (and Opera), by selecting the select field below, and using the keyboard char "M" to scroll through the options, it seems to select options in a random order. (Not alphabetically I think). Some options even get selected two times before another gets selected once. Eventually, it will scroll through them in the order they are listed. Can anyone tell me why it does not do this first time? In there a way to ensure it goes through all "M..." options in the order they appear, like a tab index could do on the <select> field?

<html>
<body>
<select>
<option value="">Select</option>
<option value="Mr.">Mr.</option>
<option value="Mrs.">Mrs.</option>
<option value="Ms.">Ms.</option>
<option value="Miss">Miss</option>
<option value="Mstr.">Mstr.</option>
<option value="Dr.">Dr.</option>
<option value="M.">M.</option>
<option value="Mme">Mme</option>
<option value="Mlle.">Mlle.</option>
<option value="Prof.">Prof.</option>
<option value="Judge">Judge</option>
<option value="Juge">Juge</option>
<option value="Father">Father</option>
<option value="Pére">Pére</option>
<option value="Rabbi">Rabbi</option>
<option value="Rabbin">Rabbin</option>
<option value="Rev.">Rev.</option>
<option value="Sen.">Sen.</option>
<option value="Sir">Sir</option>
<option value="Sister">Sister</option>
<option value="Soeur">Soeur</option>
</select>
</body>
</html>

Recommended Answers

All 4 Replies

The options are not in alphabtical order,
keypress M is selecting items in the order they are coded
html, can't spell.

The items are in the order in which they need to be. To test my problem, load the page in IE 7 or 8. Click on the down arrow to see the list. Then hit "M" on your keyboard. It will select the first item, "Mr.". Click "M" again and it will jump to "Mme", then "Mlle.", then back to "Mr." and then to "Mrs." and in proper order as they appear. I think it is an IE bug, although I think I saw the same happen in Opera.

Hi mairtino,

I'm no browser expert, but what I would logically conclude is that; IE and Opera are reading your initial key press of "m" then when you click it again, it assumes you doing "m+m". Hence it skips the rest. Whereas, the second time around, its just querying "m" as there is no "m+m+m+m+m+m"

Make sense?

Actually I think you are correct. I think I notice this behaviour when using drop down selects with numbers, pressing 1 will get you 1, while pressing it again will get you 11 as opposed to 10.

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.