• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Console Errors When Trying to Add Header/Footer

Explorer ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

Hi there!

Hoping someone might be able to help explain this to me.. I searched for a while and can't find any similar occurrences.

I just went to add a footer to a document I'm working on (manually - using the "Header & Footer" tool). As soon as the options window came up, the JS console also popped up and started going haywire with errors. Each time I typed a letter or clicked anything on the Header & Footer options window, the console showed another block of the same errors. In all there were over 600 lines of the same errors repeating.

They are all mostly reference errors claiming that several of my document level functions are not defined - when they most definitely are.

Does the Header & Footer tool cause some sort of JS event? And if so, why wouldn't it recognize the functions? I'm super confused here. An example of the errors is below.

Thank you!

ReferenceError: no_zero is not defined

1:Field:Format

TypeError: f is null

1:Document-Level:addToday

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: percent_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: round is not defined

2:Field:Calculate

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: round is not defined

7:Field:Calculate

ReferenceError: round is not defined

5:Field:Calculate

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: percent_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

TOPICS
Acrobat SDK and JavaScript

Views

404

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 26, 2018 Oct 26, 2018

Copy link to clipboard

Copied

It starts the JavaScript form processing. Do you have any form fields?

The errors are indicating there are missing or misspelled form field names, missing document level functions for rounding,  and what may be a filter applied to an array of values. It would be very helpful if you could post a link to the form, so we could view the form in its entirety.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 27, 2018 Oct 27, 2018

Copy link to clipboard

Copied

Most of the automation and actions done by Acrobat/Reader are done using JavaScript. All of the tools provided by Adobe in the application folder were one in plain text and consisted of JavaScript statements. If one looks that Adobe JavaScript provided methods, most of the options accessible through the Acrobat menu bar are present in the JavaScript method.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

LATEST

Hi there and thanks for your replies! I can share the form but it would have to be privately as it's for work... if you're willing to take a look at it for me, could I send it to you in a private message or email?

The form has lots of form fields, and lots of JavaScript. I am confused as I've never seen these errors pop up when adding a header/footer or using any of the other automation tools provided by Acrobat, and many of my other forms contain similar scripts. I understand what the errors are saying (to a point), but the functions it's saying are "not defined" are defined in document-level scripts and I haven't seen any of these errors in my testing until now.

I'm also starting to think that there might be another problem, as when I opened up the file this morning, it's displaying "0" in all of my calculated fields even though I have a document-level script that is supposed to suppress anything with a value of 0. The second I changed the value of one field, the 0s disappeared.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines