pp108 : setFocus()

setFocus()


This method causes an element to receive focus. It also executes the code specified by the DOMFocusIn event.

Syntax

Script controlID.setFocus()


Return Value


No return value.

Remarks


This method sets the element to focus. If the element is positioned in a collapsed groupbox, the groupbox is expanded and the focus set on the element. Thexforms-onexpandevent is fired when a collapsed groupbox is expanded.

If the element is positioned in an inactive tab, the tab is selected, and the element is set to focus. Theontabblur|ontabblur Event|andontabfocus|ontabfocus Event|events are fired when the inactive tab is selected.

Applies to


Input, Password, Textarea, Check, Select, List