< Day Day Up > |
Button controls are likely to be familiar to you from HTML forms. Button controls in InfoPath have a useful OnClick event, as scripting code can be written to respond to that event. They are therefore very important controls in InfoPath 2003, because no other form controls have an associated event that responds directly to user interaction. The General tab of the Button Properties window contains the most important properties. From the Action drop-down menu, select whether you want the button control to submit the data, or whether you want to add script code to the button control.
In the Label text box, provide a meaningful label for the button to help the user understand its function. To ease scripting for yourself or for a developer who has to maintain your code, provide a meaningful name for the button control in the Script ID text box. The button control was demonstrated in Chapter 1, "Getting Started with InfoPath." The OnClick event is discussed in Chapter 19, "Events in InfoPath." To learn more about the OnClick event, see "The OnClick Event," p. 343 (Chapter 19). |
< Day Day Up > |