XSLTools

docs/JavaScript-reference.html

579:d16b152c2d21
2007-06-05 paulb [project @ 2007-06-05 23:17:54 by paulb] Updated release notes.
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">     2 <html xmlns="http://www.w3.org/1999/xhtml"><head>     3   <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" />     4        5   <title>JavaScript Function Reference</title><meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />     6   <link href="styles.css" rel="stylesheet" type="text/css" /></head>     7 <body>     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&nbsp;<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&nbsp;<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&nbsp;<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&nbsp;<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&nbsp;<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&nbsp;<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&nbsp;affect the outcome of the update. For example:<br /><pre>'/package$1/name'</pre>Typically, one would use an&nbsp;<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&nbsp;<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&nbsp;<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&nbsp;<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>