paulb@615 | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
paulb@391 | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
paulb@391 | 3 | <html xmlns="http://www.w3.org/1999/xhtml"><head> |
paulb@391 | 4 | <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" /> |
paulb@615 | 5 | <title>JavaScript Function Reference</title> |
paulb@391 | 6 | <link href="styles.css" rel="stylesheet" type="text/css" /></head> |
paulb@391 | 7 | <body> |
paulb@615 | 8 | <h1>JavaScript Function References</h1> |
paulb@615 | 9 | <p>The following JavaScript functions are available for the triggering of in-page updates:</p> |
paulb@615 | 10 | <h2>requestUpdateArea</h2> |
paulb@615 | 11 | <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 /> |
paulb@615 | 12 | <pre>'platforms'</pre> |
paulb@615 | 13 | 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 /> |
paulb@615 | 14 | <pre>'/package$1/platforms$1'</pre> |
paul@678 | 15 | Typically, one would use an <a href="../apidocs/XSLForms.Output-module.html">template extension function</a> to provide such information. For example:<br /> |
paulb@615 | 16 | <pre>'{template:other-elements(..)}'</pre> |
paulb@615 | 17 | Selector fields may be specified in addition to regions:<br /> |
paulb@615 | 18 | <pre>'{template:selector-name('remove_platform', .)}'</pre> |
paulb@615 | 19 | 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> |
paulb@615 | 20 | <h2>requestUpdate</h2> |
paulb@615 | 21 | <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 /> |
paulb@615 | 22 | <pre>'/package$1/name'</pre> |
paul@678 | 23 | Typically, one would use an <a href="../apidocs/XSLForms.Output-module.html">template extension function</a> to provide such information. For example:<br /> |
paulb@615 | 24 | <pre>'{template:other-attributes('name', .)}'</pre> |
paulb@615 | 25 | 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> |