1 2 3 4 5 6 7 8 9 10 11 12
  
     | 
    
      <html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01021240"><META NAME="lcid" CONTENT="1033"><title>DocActionEvent Object</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><p id="ExpandAllLine" class="ExpFav"><a href="#" onclick="ExpandAll()" onkeypress="ExpandAll()" class="DropDown"><img id="picHeader" border="0" src="expandtri.gif" alt="Show All"><span id="ExpandAll">Show All</span></a></p><h1>DocActionEvent Object</h1><div class="ofvbanav"><span class="ofvbanavreuse" id="seealso" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="properties" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="methods" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="events" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="specifics" onclick="toggleList()" onkeypress="toggleList()"></span></div><table class="ofvbaomart"><tr><td class="noborder" nowrap="true"><A HREF="xdobjDocActionEvent.htm" title="DocActionEvent"><SPAN class="omblue">DocActionEvent</SPAN></A><br /></td></tr></table><p>An event object that is used during a Microsoft Office InfoPath 2003 button click event. The <b class="bterm">DocActionEvent</b> 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.</p><h2>Remarks</h2><p>The <b class="bterm">DocActionEvent</b> object is passed as a parameter to the <b class="bterm"><a href="xdevtOnClick.htm" id="HV01027661" lcid=" ">OnClick</a></b> event button that is contained in a view of an InfoPath form. Its properties are available only during the <b class="bterm">OnClick</b> event.</p><h2>Using the DocActionEvent object</h2><p>In the following example, the <b class="bterm"><a href="xdproSource_2.htm" id="HV01021337" lcid=" ">Source</a></b> property of the <b class="bterm">DocActionEvent</b> object is used to display the source XML data of the inner-most XML <a href="#" class="glossary" onclick="AppendPopup(this,'ofdocumentobjectmodeldom')" onkeypress="AppendPopup(this,'ofdocumentobjectmodeldom')">Document Object Model (DOM)</a> node of the  form's underlying XML document, which contains the button:</p><pre><code>function ShowDocActionEventSource::OnClick(eventObj)
{
   XDocument.UI.Alert("Source: " + eventObj.Source.xml);
}</code></pre><p>For more information about using the <b class="bterm">DocActionEvent</b> object, see <a href="inconRespondingToFormEvents.htm" id="HV01039911" lcid=" ">Responding to form events</a>.</p><script type="text/javascript" language="JScript" src="ofvbanl.js"></script><span id="ofVBAISpan" class="ofvbaispan"><iframe id="ofVBAIFrame" frameborder="0" marginheight="0" marginwidth="4" scrolling="auto" width="100%" src="../links/xdobjDocActionEvent_l.htm"></iframe></span><center><a href="XMLSchemaCopyright_HV01147162.htm">©2003-2004 Microsoft Corporation. All rights reserved.</a>  
Permission to copy, display and distribute this document is available at: <a 
href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&CTT=11&Origin=HV011232471033" 
target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html> 
     |