Search code examples
javascriptlotus-dominodomino-designer-eclipse

version of javascript in Domino Designer?


In working on a Domino web-based form, in the onChange event for a field (JavaScript), I am not able to use certain syntax, as it throws errors and the code will not save. Examples are:

  • instead of var, I would like to use const and let, but it will not take it.
  • Also, when trying to use arrow functions it throws an invalid syntax error.

So does Designer come with a particular version of Javascript built in for compiling/syntax validation? Is there a way to update that (patch or something on the Designer client?)

I am using HCL Domino Designer 11.1


Solution

  • I think there's nothing you can do about the javascript syntax validation when editing JS in a form, but there is a workaround.

    If you create a new File Resource in your database (under Resources->Files in the Applications pane), and give that resource a name ending with ".js", you can edit it in Designer with syntax highlighting but without validation, so you can use newer syntax.

    Put functions in the File Resource for all your form logic, call those functions from events in the form, and also reference the File Resource in a script tag in the form header.