unboundControls Element

Defines the unbound button controls that are used in the view.

Type

  xsd:complexType

Structure

Name Description
button (Optional element) Defines a button that has an associated action.

Remarks

The unboundControls element is an optional element of the view element.

Unbound controls in Microsoft Office InfoPath 2007 are the buttons that are dragged from the Controls task pane onto the view in design mode. The name assigned to the button control is used in the name attribute of the button element, and when a user clicks on the button, the scripting code associated with the button will be called.

Example

The following is an example of the unboundControls element:

  <xsf:view>
   <xsf:unboundControls>
      <xsf:button name="MyButton"></xsf:button>
   </xsf:unboundControls>
   ...
</xsf:view>

The following script handler, included in the script file, will be called when the button is clicked:

  function MyButton::OnClick()
{
   // Write your code here.
}