Show All

# 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 2003 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.
    }

©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