Show All

# useScriptHandler Element

Specifies that the submit, save, or version upgrade operation will be handled using form code.

## Type

    xsd:element

## Remarks

The useScriptHandler element is an optional element of the submit element, the save element and the documentVersionUpgrade element. The useScriptHandler element contains no attributes or child elements.

When used with the submit element, it declares that the form data will be processed by script code in the associated form file. The submit form code must be written in the OnSubmitRequest event handler in the form's primary script file.

When used with the save element, it declares that the save operation of the form data will be processed by form code in the associated form code file. The code must be written in the OnSaveRequest event handler in the form's primary scripting file.

When used with the documentVersionUpgrade element, it declares that the upgrade of older forms (created with an older version of the form template) will be processed by form code in the associated scripting file. The form upgrade code must be written in the OnVersionUpgrade event handler in the form's primary script file.

## Example

The following is an example of the useScriptHandler element:

    <xsf:documentVersionUpgrade>
       <xsf:useScriptHandler/>
    </xsf:documentVersionUpgrade>

©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