Select.onBlur

JavaScript1.0+, JScript1.0+ Nav2+, IE3+, Opera3+ Syntax

onBlur="command"

Description

The onBlur event handler of an instance of a Select object is fired when the focus is moved away from that particular select box. Care should be taken when using this event handler, because it is possible to get into an infinite loop when using onFocus event handler or focus() method.

Example

Listing 7.470 contains two select boxes, one of which has the Blur event intercepted within its tag and a text box. The text box is used for a counter for the number of times the Blur event is fired.

In the script, the event is fired and the event handler calls a function that reassigns the first select box focus. The result of this is that when a user ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.