paulb@397 | 8 | <h1>JavaScript Function References</h1><p>The following JavaScript functions are available for the triggering of in-page updates:</p><h2>requestUpdateArea</h2><p>Parameters:</p><dl><dt><code>url</code></dt><dd>The URL (which may be relative to the current page or resource) to which the update shall be sent. For example:<br /><pre>'platforms'</pre>The above example causes an update to be sent to the location <code>platforms</code> relative to the current page.</dd><dt><code>sourceAreasStr</code></dt><dd>A comma-separated list of regions in the form data which affect the outcome of the update. For example:<br /><pre>'/package$1/platforms$1'</pre>Typically, one would use an <a href="../apidocs/public/XSLForms.Output-module.html">template extension function</a> to provide such information. For example:<br /><pre>'{template:other-elements(..)}'</pre>Selector fields may be specified in addition to regions:<br /><pre>'{template:selector-name('remove_platform', .)}'</pre>The above example causes the <code>remove_platform</code> selector field to be included in the update.</dd><dt><code>targetName</code></dt><dd>The element identifier (specified by an HTML or XML <code>id</code> attribute) within which the outcome of the update shall appear.</dd><dt><code>targetAreasStr</code></dt><dd>A comma-separated list of regions in the form data which are affected by the update. See the <code>sourceAreasStr</code> parameter for more details.</dd><dt><code>elementPath</code></dt><dd>A simple path into the form data, defining the scope of the update.</dd></dl><h2>requestUpdate</h2><p>Parameters:</p><dl><dt><code>url</code></dt><dd>The URL (which may be relative to the current page or resource) to which the update shall be sent. See the description of the <code>url</code> parameter for the <code>requestUpdateArea</code> function for more details.</dd><dt><code>fieldNamesStr</code></dt><dd>A comma-separated list of fields in the form data which affect the outcome of the update. For example:<br /><pre>'/package$1/name'</pre>Typically, one would use an <a href="../apidocs/public/XSLForms.Output-module.html">template extension function</a> to provide such information. For example:<br /><pre>'{template:other-attributes('name', .)}'</pre>The above example causes the field associated with the <code>name</code> attribute on the current element to be included in the update.</dd><dt><code>targetName</code></dt><dd>The element identifier (specified by an HTML or XML <code>id</code> attribute) within which the outcome of the update shall appear.</dd><dt><code>targetFieldNamesStr</code></dt><dd>A comma-separated list of fields in the form data which are affected by the update. See the <code>fieldNamesStr</code> parameter for more details.</dd><dt><code>elementPath</code></dt><dd>A simple path into the form data, defining the scope of the update.</dd></dl></body></html> |