Scroll wheel changes selection in drop-down menus
June 16, 2004
Elearning | Hardware | Javascript | Questionmark Perception | Usability | Web Building

In some of the Questionmark quizzes I've made there are "selection" questions, which are simply pull down menus with several possible answers to a question. I started getting emails from scroll wheel users complaining that Questionmark was changing their answers.

It turned out users would make a selection, then immediately start scrolling the wheel without deselecting the menu, so the scroll wheel would scroll within the menu. I didn't want to disable the scroll wheel or something like that, so I looked for a way to jump the cursor out of the menu when something is selected.


Ads by Google

Posted by ellen at June 16, 2004 11:00 AM
 
# #redefine selection question to remove scrollwheel problems
SEL=
%START_sel%
<TD>
%CHOICE.CONTENT%
</TD><TD>
<INPUT TYPE=HIDDEN NAME="%QUESTION.ID%" VALUE="%CHOICE.ID%">
<SELECT NAME="%CHOICE.ID%" %DO_SEL% onchange="self.focus();" onfocus="options[0].selected = true; return false;" tabindex="-1">
<OPTION VALUE=""></OPTION> # empty option
%CHOICE.OPTION%
</SELECT>
</TD>
%END_sel%

# # this is the definition of DO_SEL, which already includes an onChange statement, so if I were using QXQ, I would remove the variable and replace it with a javascript where both scripts are combined in one onChange statement. But for the moment I don't need to worry about that.

DO_SEL=
_IF %USE_QXQ% = 1
onChange="DoChange(%QUESTION.NUMBER%,this); "

Thank you to tommy916 on the devshed forums for the javascript: Unfocus on drop down list


Ads by Google


Ads by Google

 RSS   |   Contact Me


Ads by Google