Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  Component Development

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.


Does this content meet your programming needs? Write us!

Back to topBack to top

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site