Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
protogrid:script_library [2017-12-15 09:46] – 46.140.51.3 | protogrid:script_library [2017-12-15 09:47] – 46.140.51.3 | ||
---|---|---|---|
Line 6: | Line 6: | ||
Server-ScriptLibraries contain code happening at the server before sending the data to the client. Every [[protogrid: | Server-ScriptLibraries contain code happening at the server before sending the data to the client. Every [[protogrid: | ||
- | == on_render == | + | ==== on_render |
on_render gets called when opening a new Card. This function can be used for example to [[protogrid: | on_render gets called when opening a new Card. This function can be used for example to [[protogrid: | ||
<code javascript> | <code javascript> | ||
Line 57: | Line 57: | ||
If you want the code to be executed on load of every card, write your code into a separate JavaScript file and load it into the attachments section on the " | If you want the code to be executed on load of every card, write your code into a separate JavaScript file and load it into the attachments section on the " | ||
- | ==== Execute JS on field change === = | + | ==== Execute JS on field change ==== |
To execute some JavaScript when a field value changes, you need to add the following code-snippet to a client-side Script library, which is linked to the Proto with some Trigger. The variable " | To execute some JavaScript when a field value changes, you need to add the following code-snippet to a client-side Script library, which is linked to the Proto with some Trigger. The variable " |