Javascript Errors

Dec 11, 2018

Copy link to clipboard

Copied

My form was working perfectly until I added some script to hide fields based on a button... now I get an error

JavaScript Debugger (window) says:

TypeError:  f is null

1051:byteCodeTool

Any ideas?



   
 
 
 
 
 
 
 
 
 
 
 





In some code somewhere in the form, it's attempting to assign a field object to the variable f, for example:

var f = getField("Text1");

but the field ("Text1") does not exist. It could be that it was deleted or renamed. You're going to have to find the code and determine which field name it's using, and go from there.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

202

Likes

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

Javascript Errors

Dec 11, 2018

Copy link to clipboard

Copied

My form was working perfectly until I added some script to hide fields based on a button... now I get an error

JavaScript Debugger (window) says:

TypeError:  f is null

1051:byteCodeTool

Any ideas?



   
 
 
 
 
 
 
 
 
 
 
 





In some code somewhere in the form, it's attempting to assign a field object to the variable f, for example:

var f = getField("Text1");

but the field ("Text1") does not exist. It could be that it was deleted or renamed. You're going to have to find the code and determine which field name it's using, and go from there.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

203

Likes

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
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

Check the field names.

Likes

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
Reply
Loading...
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

For what?  Please explain

Likes

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
Reply
Loading...
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

form.png

Likes

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
Reply
Loading...
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

Compare the field names in your code with the field names in the form.

Likes

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
Reply
Loading...
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

I wrote this for approx. 20 fields to hide when check box is
selected – naming all the fields starting with “Redo.”  It's the only one I have I think...

var nHide =
event.target.isBoxChecked(0)?display.visible:display.hidden;

  1. this.getField("Redo").display = nHide;

The only other one I have is a purchased cascade script from
MVP which appeared to be working fine prior to adding the above…

Both actually work but the Debugger error window keeps
coming up every time anything is slected?

Likes

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
Reply
Loading...
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

I did delete a field that had script in it though... would that be causing the issue?

Likes

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
Reply
Loading...
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

Where did you set the variable f?

Likes

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
Reply
Loading...
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

I'm not sure what that means?  ... but the issue appears to be in the cascade drop lists

Likes

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
Reply
Loading...
Dec 11, 2018 0
Dec 11, 2018

Copy link to clipboard

Copied

In some code somewhere in the form, it's attempting to assign a field object to the variable f, for example:

var f = getField("Text1");

but the field ("Text1") does not exist. It could be that it was deleted or renamed. You're going to have to find the code and determine which field name it's using, and go from there.

Likes

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
Reply
Loading...
Dec 11, 2018 0