Show All

# DocActionEvent Object

DocActionEvent

An event object that is used during a Microsoft Office InfoPath 2003 button click event. The DocActionEvent object provides a number of properties that can be used within a button click event to programmatically interact with the data in a form's underlying XML document and to control the success or failure of the event.

## Remarks

The DocActionEvent object is passed as a parameter to the OnClick event button that is contained in a view of an InfoPath form. Its properties are available only during the OnClick event.

## Using the DocActionEvent object

In the following example, the Source property of the DocActionEvent object is used to display the source XML data of the inner-most XML Document Object Model (DOM) node of the form's underlying XML document, which contains the button:

    function ShowDocActionEventSource::OnClick(eventObj)
    {
       XDocument.UI.Alert("Source: " + eventObj.Source.xml);
    }

For more information about using the DocActionEvent object, see Responding to form events.

©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