Transporting data from JS to Notes and viceversa
Attribute(s)
Transporting data from JS to Notes and from Notes to JS
Description
Transporting data from JS to Notes and from Notes to JS is described in the Details section.
Motivation
It is important that it is clear how JS will receive its information from Notes and how Notes will receive information from JS.
Example / Details
There are 3 permitted ways of transporting data from Notes to JS and from JS to
Notes:
Generate HTML for all fields
SoF variable (sof is Set On Form)
Self-defined hidden HTML fields
Generate HTML for all fields
The option 'Generate HTML for all fields' (second tab on Form properties box)
is the easiest way to handle your communication between Notes and JavaScript.
Notes will generate hidden HTML fields. JavaScript can access these fields and
read and write the values.
Be careful with this option. All content of the hidden fields are visible in
the HTML source code. This could cause security problems, e.g. if some fields
are highly confidential. Do not add the fields on the 'Web' form or DO NOT USE
THIS OPTION.
SoF variable (SoF is Set on Form)
It is possible to create variables which values are filled by @Formula language
(see: Storage of JS Code).
Self-defined hidden HTML fields
Add the following HTML to the form.
<INPUT Type='Hidden' Name='<FieldName>' Value='<FieldValue>' > (FieldValue can
be calculated with Computed Text)
Be aware: The Notes Fields must be available on the form. This will not work in
combination with 'Generate HTML for all fields'.