[Contents]
This section describes new and revised events.
event
type
target
In Navigator 4.0, a window or document can capture events before they reach their intended target. For more information see "Event Capturing".
NOTE: Navigator 4.0 recognizes mixed-case and lower case use of events and event handlers. For example, you can explicitly call an event handler using either element.onclick or element.onClick.
element.onclick
element.onClick.
(Revised to include new properties) Occurs when the user clicks a link or a form element (a Click is a combination of the MouseDown and MouseUp events).
onClick="handlerText"
handlerText
document
Button
Checkbox
Link
Radio
Reset
Submit
layerX
layerY
pageX
pageY
screenX
screenY
which
modifiers
Occurs when the user double-clicks a form element or a link.
NOTE: DblClick is not implemented on the Macintosh.
onDblClick="handlerText"
area
link
Occurs when the user drops an object onto the Navigator window, such as dropping a file on the Navigator window.
onDragDrop="handlerText"
window
data
The DragDrop event is fired whenever a system item (file, shortcut, etc.) is dropped onto the Navigator window via the native system's drag and drop mechanism. The normal response for the Navigator is to attempt to load the item into the browser window. If the event handler for the DragDrop event returns true, the browser will load the item normally. If the event handler returns false, the drag and drop is canceled.
Occurs when the user depresses a key.
onKeyDown="handlerText"
Image
Textarea
fromCharCode
charCodeAt
modifiers contains the list of modifier keys held down when the KeyDown event occurred.
A KeyDown event always occurs before a KeyPress event. If onKeyDown returns false, no KeyPress events occur. This prevents KeyPress events occurring due to the user holding down a key.
false
KeyPress
KeyUp
Client-side event. Occurs when the user presses or holds down a key.
onKeyPress="handlerText"
modifiers contains the list of modifier keys held down when the KeyPress event occurred.
A KeyPress event occurs immediately after a KeyDown event only if onKeyDown returns something other than false. A KeyPress event repeatedly occurs until the user releases the key. You can cancel individual KeyPress events.
KeyDown
Event. Occurs when the user releases a key.
onKeyUp="handlerText"
modifiers contains the list of modifier keys held down when the KeyUp event occurred.
Occurs when the user depresses a mouse button.
onMouseDown="handlerText"
If onMouseDown returns false, the default action (entering drag mode, entering selection mode, or arming a link) is canceled.
NOTE: Arming is caused by a MouseDown over a link. When a link is armed it changes color to represent its new state.
Occurs when the user moves the cursor.
onMouseMove="handlerText"
None
The MouseMove event is sent only when a capture of the event is requested by an object (see
captureEvents
(Revised to include new properties) Occurs when the user moves the cursor out of an object.
onMouseOut="handlerText"
Area
Layer
(Revised to include new properties) Occurs when the user moves the cursor over an object.
onMouseOver="handlerText"
Occurs when the user releases a mouse button.
onMouseUp="handlerText"
If onMouseUp returns false, the default action is canceled. For example, if onMouseUp returns false over an armed link, the link is not triggered. Also, if MouseUp occurs over an unarmed link (possibly due to onMouseDown returning false), the link is not triggered.
Occurs when the user or script moves a window.
onMove="handlerText"
Occurs when a user or script resizes a window.
onResize="handlerText"
width
height
This event is sent after HTML layout completes within the new window inner dimensions. This allows positioned elements and named anchors to have their final sizes and locations queried, image SRC properties can be restored dynamically, and so on.
SRC