
Fires when the user aborts the download of the image.
An image can be aborted by clicking a link, clicking the Stop button, and so on. This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event
Fires after the transfer of data from the element to the data provider (after a successful onbeforeupdate).
This event only fires when the object is databound and an onbeforeupdate event has fired (the element's data has changed). This event cannot be canceled. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
APPLET, BODY, BUTTON, CAPTION, DIV, EMBED, IMG, INPUT, MAP, MARQUEE, OBJECT, SELECT, TABLE, TD, TEXTAREA, TR
Fires prior to a page being unloaded.
This event gives you a chance to request that the user not leave the page. By returning a string to this event, a dialog box is displayed that gives the user the option to stay on the page. The returned string is displayed in a predefined area to provide the user with the reason.
This event also fires when a document.open is done and when a frameset is created.
Fires before the transfer of data from the element to the data provider. Fires when an element loses focus or the page is attempting to unload when the value of the element has changed from the value that was in the element at the time it received the focus.
This event can be canceled. This allows the programmer to 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. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
APPLET, BODY, BUTTON, CAPTION, DIV, EMBED, HR, IMG, INPUT, MAP, OBJECT, SELECT, TABLE, TD, TEXTAREA, TR
Fires when an object, such as a button or check box, loses the input focus.
This event is fired even when clicking another control or the background of the page, switching applications, or opening another window within the browser. This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event
A, APPLET, AREA, BUTTON, DIV, EMBED, HR, IMG, INPUT, MARQUEE, OBJECT, SELECT, SPAN, TABLE, TD, TEXTAREA, TR, window
Fires when the behavior property of the MARQUEE element is set to "alternate" and the contents of the marquee reach a side.
This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event.
Fires when the contents of the object have changed.
This event is fired when the contents are committed, not while the value is changing. For example, on a text box, this event is not fired while the user is typing, but rather when the user commits the change by pressing ENTER or leaving the text box focus. This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event.
This code is executed before the code specified by onblur, if the control is also losing the focus.
Fires when the user presses and releases the left mouse button, or when the user presses keys, such as ENTER and ESC, in a form.
The following actions cause an onclick event:
- Click the left mouse button.
- Press ENTER when either the submit control or a nonbutton control in the form has focus.
- Press the ESC key when any control in the form has the focus.
- Press the SPACEBAR when a checkbox, radio, reset, or submit control has focus or a BUTTON or TEXTAREA element has focus.
- Press the access key specified by the accessKey property for a checkbox, radio, reset, or submit control or a BUTTON, OPTION, SELECT, or TEXTAREA element.
The default action of an onclick event depends on the object that receives the click. For example, clicking an A element causes the browser to load the document specified by the href property. You can cancel the default behavior by setting the returnValue property of the event object to FALSE.
If the user clicks the left mouse button, the onclick event for an object occurs only if the mouse pointer is over the object and both an onmousedown and an onmouseup event occur in order. For example, if the user presses down in the object but moves the mouse pointer out of the object before releasing, no onclick event occurs.
If the user clicks an object that can receive the input focus but does not already have the focus, the onfocus event occurs for that object before the onclick event. If the user double-clicks the left mouse button in a control, an ondblclick event occurs immediately after the onclick event.
This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
The following JScript example is an onclick event handler for the document. It uses the event object to display the tag name of the element in which the click occurred.
<SCRIPT FOR=document EVENT=onclick LANGUAGE="JScript"> alert("Clicked in " + window.event.srcElement.tagName); </SCRIPT>The following VBScript example is an onclick event handler for the document. It uses the event object to determine whether the click occurred in an A element, and then cancels the event (and prevents a jump) if the SHIFT key is down.
<SCRIPT LANGUAGE="VBScript"> Function document_onclick() If window.event.srcElement.tagName = "A" And window.event.shiftKey Then window.event.returnValue = False End If End Function </SCRIPT>
A, ADDRESS, APPLET, AREA, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET FONT, H1, H2, H3, H4, H5, H6, HR, I, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, FORM, document
Fires periodically as data arrives for data source objects that transmit their data asynchronously. Frequency of firing is dependent upon the data source object.
This event fires for objects and applications that are data source objects. There is a qualifier property on the event object; the qualifier will always be set to "" for Internet Explorer 4.0. This event cannot be canceled. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
Fires when the data set exposed by a data source object changesfor example, when a filter operation takes place. Also fires when initial data is available from a data source object.
This event fires for objects and applications that are data source objects. There is a qualifier property on the event object; the qualifier will always be set to "" for Internet Explorer 4.0. This event cannot be canceled. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
Fires to indicate that all data is available from the data source object.
This event fires for objects and applications that are data source objects. There is a qualifier property and a reason property on the event object. The qualifier will always be set to "" for Internet Explorer 4.0. This event cannot be canceled. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
The reason property is set to indicate the reason for completion and is one of these values:
0 Data transmitted successfully. 1 Data transfer aborted. 2 Data transfer in error.
Fires when the user clicks twice over an object.
Returns TRUE or FALSE. Returning FALSE cancels the default action.
The ondblclick event occurs when the user clicks twice (presses and releases the left mouse button and then presses and releases it again) over an object. The two clicks must occur within the time limit specified by the system's double-click speed setting. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
The order of events leading to the ondblclick event is:
- onmousedown
- onmouseup
- onclick
- onmouseup
- ondblclick
A, ADDRESS, APPLET, AREA, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, H1, H2, H3, H4, H5, H6, HR, I, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, document
Fires when the user first starts to drag a selection or selected element.
For the INPUT element, the only types supported for this event are file, image, password, and text.
This event can be canceled. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
A, ACRONYM, ADDRESS, AREA, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FONT, FORM, H1, H2, H3, H4, H5, H6, HR, I, IMG, INPUT, KBD, LABEL, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, document
Fires when a scripting error occurs; for example, when there are security problems during the loading process or just bad coding.
When programming in VBScript, you can create an event handler that receives event parameters by defining a subroutine having this form:
Sub window_onerror(message, url, line)The line parameter is an integer specifying the line number at which the error occurred, url is a string specifying the URL of the document containing the error, and the optional message is a message string. The following example uses JScript.
function errortrap(msg,url,line){ alert(msg); return true; } onerror=errortrap;This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event.
onerror event for other objects
Fires when an error occurs loading the image or other object.
You can suppress error messages that occur when an image fails to load by setting the onerror attribute in the element to "null". This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event.
Fires when the onbeforeupdate event handler specified for the element has canceled the data transfer and is fired instead of the onafterupdate event.
This event only fires when an onbeforeupdate event has fired (the element's data has changed). This event cannot be canceled. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
Fires when a visual filter changes state or completes a transition.
This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
An asterisk in the following applies to list indicates that a defined height, width, or absolute position is required.
BODY, BUTTON, DIV*, IMG, INPUT, MARQUEE, SPAN*, TABLE, TD, TEXTAREA, TFOOT, TH, THEAD, TR
Fires when looping is complete.
This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event.
Fires when a control receives the focus. This event also fires for some noncontrol elements such as HR.
This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event.
A, APPLET, AREA, BUTTON, DIV, EMBED, HR, IMG, INPUT, MARQUEE, OBJECT, SELECT, SPAN, TABLE, TD, TEXTAREA, TR, window
Fires when the user presses the F1 or Help key on the browser.
This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event.
A, ADDRESS, APPLET, AREA, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, H1, H2, H3, H4, H5, H6, HR, I, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, document, window
Fires when the user presses a key.
Returns a number specifying the keycode of the key that was pressed.
The return value can be used to override the keycode value. This event will bubble. Events that bubble can be handled on any parent element of the object that fired the event.
A, ACRONYM, ADDRESS, APPLET, AREA, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DEL, DFN, DIR, DIV, DT, EM, FIELDSET, FONT, FORM, H1, H2, H3, H4, H5, H6, HR, I, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, document
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.