Microsoft Scriptlet TechnologyMicrosoft Scriptlet Technology*
*Contents  *Index  *Topic Contents

event Property

Provides state information about a standard DHTML event passed from the scriptlet.

Applies To

Scriptlet object container

Syntax

value = ScriptContainer.event.member

Remarks

This property is read-only. The event property provides a way to get state information about any of the standard events passed from the scriptlet: onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseup. This property corresponds to the DHTML event object.

To get state information, you can query the values of the event property's members, which include altKey, ctrlKey, keyCode, offsetX, offsetY, shiftKey, srcElement, type, and others. The following example script illustrates how you can use the event property to get more information about a standard event:

Sub ScriptContainer1_onkeyup()
   MsgBox "The character typed was " & ScriptContainer1.event.keyCode
   MsgBox "The Alt key state was " & ScriptContainer1.event.altKey
   MsgBox "The Ctrl key state was " & ScriptContainer1.event.ctrlKey
   MsgBox "The Shift key state was " & ScriptContainer1.event.shiftKey
   MsgBox "The mouse was at " & offsetX & ", " & offsetY
   MsgBox "The affected control was " & ScriptContainer1.event.srcElement
   MsgBox "The event was " & ScriptContainer1.event.type
End Sub

For more information about using the event property, refer to the event object in the DHTML documentation.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.