< Day Day Up > |
The events available to programmers in InfoPath 2003 are very different from the events available to HTML forms developers, or to users of the newer W3C XML Events specification (see http://www.w3.org/TR/xml-events), which is designed for use with W3C XForms (see http://www.w3.org/TR/xforms) and other technologies. For example, in InfoPath there are no events related to setting or removing focus from a form control. Nor are there events that respond to a keypress or to hovering the mouse pointer over a part of a form. The absence of such events that you may be familiar with when scripting in HTML/XHTML pages means you have to adjust your approach to interactivity and other events in InfoPath significantly. In fact, only one event (the OnClick event) responds solely to user action, and it's available only on the button form control. This limitation means that you probably must rethink how you create forms that provide all the interactivity and other functionality you want. In addition to lacking familiar events, InfoPath also introduces several events likely to be wholly unfamiliar to you if your only coding experience has been scripting in HTML. Some of those events ” OnBeforeChange , OnValidate , and OnAfterChange ”relate specifically to the use of W3C XML Schema in the validation of the data source content of an InfoPath form. Other events (for example, OnSwitchView ) are necessary because of features specific to InfoPath. The OnSwitchView event is necessary to respond to the existence of potentially multiple views in an InfoPath form. The versioning of InfoPath form templates necessitates the existence of the OnVersionUpgrade event.
InfoPath 2003 has only nine events. InfoPath events can be classified into two groups:
|
< Day Day Up > |