Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

LiveCycle ES3 not reporting script errors

Avatar

Level 1

I have been trying to write JavaScript code on my form. I have finally gotten a few things to work by trial and error, but the 'Check Script Syntax' button and Preview never report any errors on either the Warning tab or the Log tab of the [whatever you call that pallet at the bottom of the screen]. All that happens is that the code does not work until I figure out the error. I have intentionally made the following errors:

"xfa.host.messageBoxx(..." instead of "xfa.host.messageBox(..."

" If (yada){..." instead of "if (yada){..."

"this.rawvalue" instead of "this.rawValue"

intentionally mistyping a field name to one that does not exist on the form

In *every* case, pressing the 'Check Script Syntax' button or Previewing the form produced "0 warnings/errors reported" on the Log.

Why doesn't it ever report errors?

Thanks

Donald

1 Reply

Avatar

Level 8

The 'Check Script Syntax' really only checks core JavaScript syntax errors. Technically speaking, mispelling an XFA method like rawvalue is not seen as a syntax error.

When previewing the form, press Ctrl-J to bring up the debugging console. Here you will get the line number and object where an error occurs (most of the time). Keep in mind too that the script has to be executed before the console can pick up the error.

Kyle