DHTML Events
Fires before the transfer of data from the object to the data provider.
Inline HTML |
<element onbeforeupdate = "handler" ... > |
All platforms |
Event property |
object.onbeforeupdate = handler |
ECMA-262 Language Specification |
Named script |
<script FOR=object EVENT=onbeforeupdate> |
Internet Explorer® only |
Bubbles |
Yes |
Cancels |
Yes |
To invoke |
Cause an object to lose, focus or force the page to unload, after the value of that object has changed from the value it contained upon receiving focus. |
Default action |
Signals that the data contained in an object has changed. |
Because this event can be canceled, the programmer can fail the validation and leave the content of the field as well as the cursor intact. All subsequent events are not fired when this event is canceled.
While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.
Event Object Properties
cancelBubble |
Sets or retrieves whether the current event should bubble up the hierarchy of event handlers. |
clientX |
Retrieves the x-coordinate of the position of the cursor when the mouse is clicked, relative to the size of the client area of the window but excluding window decorations or scroll bars. |
clientX |
Returns the y-coordinate of the position of the cursor when the mouse is clicked, relative to the size of the client area of the window but excluding window decorations or scroll bars. |
offsetX |
Retrieves the horizontal coordinate of the mouse's position relative to the object firing the event. |
offsetX |
Retrieves the vertical coordinate of the mouse's position relative to the object firing the event. |
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 |
Returns the horizontal position of the mouse when the event fires. |
y |
Returns the vertical position of the mouse when the event fires. |
BDO, HTMLAREA, INPUT type=text, RB, RT, RUBY, TEXTAREA
onafterupdate