Fires before a control enters a UI activated state.
Syntax
Inline HTML <ELEMENT onbeforeeditfocus = "handler" ... > All platforms Event property object.onbeforeeditfocus = handler JScript (compatible with ECMA 262 language specification) only Named script <SCRIPT FOR = object EVENT = onbeforeeditfocus> Internet Explorer only
Remarks
Bubbles Yes Cancels Yes To invoke
- Press the ENTER key or click an object when it has focus.
- Double-click an object.
Default action Moves the object into a UI activated state. The designMode property allows Web authors to use the design mode in Microsoft® Internet Explorer, and the property must be set to yes for the onbeforeeditfocus event to fire.
While the browser is in design mode, objects enter a UI activated state when the user presses the ENTER key or clicks an object that has focus, or when the user double-clicks the object. Objects that are UI activated have their own window within the document and allow authors to modify the user interface. To place an object in a UI activated state, the document must be in design mode.
The onbeforeeditfocus event differs from the onfocus event. The onbeforeeditfocus event fires before an object enters a UI activated state, whereas the onfocus event fires when an object has focus.
Event Object Properties
Although event handlers in the DHTML Object Model do not receive parameters directly, the handler can query the event object for data.
cancelBubble Sets or retrieves whether the current event should bubble up the hierarchy of event handlers. clientX Retrieves the x-coordinate of the mouse cursor relative to the client area of the window, excluding window decorations or scroll bars. clientY Retrieves the y-coordinate of the mouse cursor relative to the client area of the window, excluding window decorations or scroll bars. returnValue Sets or retrieves the return value from the event. screenX Retrieves the horizontal position of the mouse, in pixels, relative to the user's screen. screenY Retrieves the vertical position of the mouse, in pixels, relative to the user's screen. srcElement Retrieves the object that fired the event. type Retrieves the event name from the event object. x Retrieves the x-coordinate of the mouse cursor relative to the parent element. y Retrieves the y-coordinate of the mouse cursor relative to the parent element.
Applies To