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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

blur problem - please help!

Status
Not open for further replies.

ChadBryant

Programmer
Oct 29, 2004
11
US
Hi, I don't do a lot of javascript, so this might be a dumb question.

I have a page where the user selects a value from a drop down list and a table of info is loaded for the selected value in a grid like control underneath the drop down. The grid could be long so the user will need to scroll down the page often times to see all the data. The problem is that after the selection has changed and the table of data is loaded, the focus is still in the drop down, so if the user starts using their scroll wheel on the mouse (as I keep doing...very frustrating) the page doesn't scroll...their selection changes and the table keeps reloading with data over and over.

I've tried using blur() to remove the focus. Manually, I can use my mouse to click outside the drop down and then it no longer has the focus and I can scroll the page fine, but I don't want the user to have to remember to do this, I'd like to find a way to do this in javascript so that when the drop down list selection changes, the focus can be removed as if I had clicked outside the drop down with my mouse.

Is this possible? I don't want to put another textbox or something that I can set focus to as that would be strange having a textbox that isn't used and I haven't been able to set focus to an invisible/hidden textbox.

Thanks for your help!

 
just set focus to the body:
Code:
<body>
<select onchange="document.body.focus()">
<option>1
<option>2
<option>3
</select>
</body>

-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
headbang.gif
[rockband]
headbang.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top