green
04-22-2007, 09:18 AM
The problem
When users select an option from a drop down menu, they tend to immediately use the scroll wheel to move down the page with the result that they scroll the drop down list instead because it still has focus.
This code prevents that by losing focus after selection:
onChange="self.focus();"
BUT, users, on my site, often open the drop down again, don't change the option and scroll. The result (as no onChange fired): the list scrolls.
I found this code:
onChange="self.focus();" onFocus="options[0].selected = true; return false;" tabindex="-1"
which TRIES to solve the problem by returning to the TOP option in the list when it is reopened and then losing focus.
HOWEVER, I have long lists and I DON'T want the user to lose his/her original selection if he/she opens list again.
What I need..
A code to lose focus on the drop down list (so the scroll wheel won't move it) whether the user changes his/her selection or not.
I would be very grateful for any help on this :o
When users select an option from a drop down menu, they tend to immediately use the scroll wheel to move down the page with the result that they scroll the drop down list instead because it still has focus.
This code prevents that by losing focus after selection:
onChange="self.focus();"
BUT, users, on my site, often open the drop down again, don't change the option and scroll. The result (as no onChange fired): the list scrolls.
I found this code:
onChange="self.focus();" onFocus="options[0].selected = true; return false;" tabindex="-1"
which TRIES to solve the problem by returning to the TOP option in the list when it is reopened and then losing focus.
HOWEVER, I have long lists and I DON'T want the user to lose his/her original selection if he/she opens list again.
What I need..
A code to lose focus on the drop down list (so the scroll wheel won't move it) whether the user changes his/her selection or not.
I would be very grateful for any help on this :o