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

this.blur() not working for select box

Status
Not open for further replies.

bardley

Programmer
May 8, 2001
121
US
I have a frameset with two frames. The top frame controls what is displayed in the bottom frame. The top frame contains a select box with onChange=form.submit(), submitting a value to the bottom frame that determines its content.

Great, but there's an annoying side effect. After you select a value and the bottom frame reloads, the select box is still focused, so using your mouse wheel to try to scroll causes the options in the select box to scroll, rather than the content in the bottom frame.

Ok, so I tried making it:
onChange="form.submit(); this.blur();"
but it didn't produce the desired (actually, any) result in IE 6.0.

Any Ideas on how I can accomplish this seemingly simple task?

TIA! Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
 
Try to change places the 2 actions you do:

onChange="this.blur();form.submit();"

and tell what happens.
 
have you tried setting the focus on another object? It's not a lie if YOU believe it ;-)
 
Duh! How about
onChange="form.submit(); parent.bottom_frame.focus()"

Still curious why the other wouldn't remove the focus, though. Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top