Show All

# domEventHandler Element

Defines an event handler for one or more specific XML Document Object Model (DOM) nodes.

## Type

    xsd:complexType

## Structure

Name | Description
--- | ---
handlerObject | (Required attribute) Identifies the unique name of the event handler in the scripting code.
match | (Required attribute) Identifies the XML DOM node for which the event handler is declared. Value must be a valid XPath expression that identifies the XML node.
dataObject | (Optional attribute) Contains the name of the dataObject to be used in the event handler. Note Use of this attribute requires Microsoft Office InfoPath 2003 Service Pack 1.

## Remarks

The domEventHandler element is an optional element of the domEventHandlers element.

## Example

The following is an example of the domEventHandler element:

    <xsf:domEventHandlers>
       <xsf:domEventHandler
          match="TravelReport/Expenses"
          handlerObject="TravelExpenses"/>
    </xsf:domEventHandlers>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp