Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset focus to page?

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I have a form with combo's on it. There is a danger that the wheelmouse/mousewheel may change the combo's selection when someone uses the mousewheel to scroll down the web page when the focus is still on the combo box. Is there a way to set focus to the form page after a combo is clicked/set. Many thanks
 
You can use Javascript attached to the onchange event to move the focus to another control after the select has been changed
the code would be
document.form.control.focus();
adjusted to reflect your form and control.

Good Luck
 
Many thanks Wiszh. I thought I found an answer with this that I found on search:
<select onmousewheel="return(false);">

But having trouble finding where to put it in the code below, and whether all the combo's need to be done this way. No global routine?


<tr>
<td class="DescriptorCell" width="19%" bgcolor="#FFFFFF">DBC-12</td>
<td class="DescriptorCell" bgcolor="#FFFFFF" width="34%">12mins</td>
<td class="ContentCell" width="9%" bgcolor="#FFFFFF">
<select name="DB12">
<script type="text/javascript">document.write(makeOptions(101));</script>
</select>
</td>


Regards, thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top