Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Variable functions are not recognized in Acrobat Reader DC


Level 1

Using LiveCycle Designer ES4, I have created variable functions in JavaScript that I call in field events.  These functions work correctly in Adobe 11.  However, when tested in Acrobat Reader DC, these functions no longer work.  If I move the script from the function into the field event, the script works.  However, I do not want to stop using variables.  Many of these variables are long and used in many fields.  Does anyone have a fix for this issue?

Below is an example of one of the JavaScript variable functions currently being used in Adobe 11:

form1.#variables.EnterFieldFC - (JavaScript, client)

function EnterFieldFC(oField)


oField.border.edge.presence = "visible"

Field.border.edge.color.value = "255,0,0"

Field.borderWidth = "1.5";


Below is the call in the Enter field event:


When the JavaScript Debugger is enabled in Acrobat Reader DC, an error message is displayed on entering the field stating that the function EnterFieldFC is unknown.

6 Replies


Level 10

In your script your using the parameter "Field" instead of "oField" as declared in the function head, that's why the function fails.

Correct the script into:

function EnterFieldFC(oField) {

  oField.border.edge.presence = "visible"

  oField.border.edge.color.value = "255,0,0"

  oField.borderWidth = "1.5";



Level 1

I am sorry for the typo.  oField is already used in all of the lines.  It must not have copied correctly.  So I took a screen shot instead.



Level 10

Anything stupid could be the issue here...

Could it be because of the missing semi-colons at the end of the first 2 lines?

Try having a different name for your function or variable...

Otherwise some debugging is needed, use the try catch statement for livecycle, this could help a lot

Handling JavaScript Exceptions

Hope this will help!


Level 10

Ensure you set the scripting language in the fields enter Event to JavaScript!

If it's not, the script will fail because you cannot call JavaScript-script from a FormCalc-script and vice versa.