JavaScript field: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 45: Line 45:


Compatibility of Memento field types and JavaScript objects is shown in the table:
Compatibility of Memento field types and JavaScript objects is shown in the table:
{| class="wikitable" style="font-size:120%"
{{FieldTypeReturnValues}}
|-
! Field type !! JavaScript object
|-
| Text , Hyperlink, Password, Phone, Email, Calculation (string result) , Single-choice list , Radio buttons || [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String '''String''']
|-
| Integer, Real number, Rating, Currency, Calculation (number result) || [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number '''Number''']
|-
| Date , DateTime, Time || [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date '''Date''']
|-
| Checkbox (Boolean) || [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean '''Boolean''']
|-
| Multiple-choice list, Checkboxes || [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array '''Array'''] of [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String '''String''']
|-
| Link to entry || [https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array '''Array'''] of [[Triggers#Object Entry|'''Entry''']]<br/>Each array element has a method ''field()'' for access to values of fields of entries of the linked library.<br/>Example: field("linkField")[i].field("remoteField")
|}


== Time of script execution ==
== Time of script execution ==