This will take the input focus away from the receiving window, usually the one at the top of the window hierarchy. On some platforms, this will also make the window inactive and may put it to the back of the window hierarchy.
There are good arguments for using the focus() method on another window rather than the blur() method. Removing focus from a window should make it safe from inadvertent mouse clicks at the expense of making the window inactive altogether, which could be frustrating for the user.
This method is not supported by MSIE version 3.
It is possible that a window may become inactive with this method and since no window has focus you could have an active application with no active window. This is a fairly sloppy way of providing a UI interaction. A better technique is to use the focus() method to redirect the focus to the desired window which, by implication, blurs() any other that may previously have had the focus. This should result in a more consistent behavior for the user.
Prev | Home | Next |
Window.back() | Up | Window.btoa() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |