viewer.paramAdded by IBM on October 10, 2012 | Version 1 (Original)
|Lets you call one of several name attributes of the HTML param element. It returns the value of the specified name attribute’s associated value attribute. This function is only valid if the IBM® Forms Viewer is embedded in an HTML page. Tags: viewer package, HTML name attributes, XFDLID, TTL, detach_id, refresh_URL, retain_viewer, portlet_URL, determining, XFDL, 8.0, spec
Table 1. viewer.param parameters
|name||String||The value of the name attributes in the HTML param element. They are:
- instance_1... instance_n
Returns The value of the HTML param element's value attribute.
Usage details The HTML object element is used to embed XFDL forms inside HTML pages. The HTML param element consists of name and value attributes that have no meaning in HTML. However the properties of the name and value attributes determine the Viewer's behavior when embedded in an HTML page. The viewer.param function returns the value of the param element's value attribute for use in XFDL computes. To do this, it must call the relevant attribute property by name to retrieve its value. These properties are:
Returns the ID of the tag that contains the form information.TTL
Returns the length of time that the detached form is alive before being destroyed automatically. The value is given in seconds. For example, 60.detach_id
Returns the unique ID of the form instance, which is used in successive objects to allow the form to be reattached and updated.refresh_URL
Returns the URL called to reload the XFDL form if detach_id has timed out.retain_viewer
Returns either off or on, depending on whether the Viewer remains available after completing replace or done actions. If retain_viewer is off, the Viewer closes after completing either action. If it is on, the Viewer remains available for further use, such as to retain form data after a submission.portlet_URL
Returns the URL of the portlet.instance_1... instance_n
Returns information regarding the XML data inside the HTML document that will replace or be appended to a specific XML instance inside the XFDL form. This information includes:
Note: You must use the event model, such as keypress or mouseover events or the toggle function, to trigger the param function. If you want getHeight to run when the form opens, toggle the function off of the value of the global.global.activated option. This option switches to on when the form is opened.
Two additional values can also be returned:
- The ID of the new instance
- The ID of the form instance
- Either replace or append, depending upon whether the new instance data replaces or adds to the original instance data. Note that replace is the default value.
- The reference within the instance that indicates where the new data should be placed. Note that any namespaces listed in this value resolve relative to the document root.
Example In the following example, when a user selects BUTTON1, param returns the XFDLID value to FIELD3:
<value compute="toggle(BUTTON1.activated, 'off', 'on') ==
'1' ? viewer.param('XFDLID') : value"></value>