These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Function construction error message

David Dunn
Registered: Oct 28 2010
Posts: 116
Answered

OK, I’ve got my trusty Dubert book and API Reference, and I’m following the instructions and examples for creating a function. It appears to me I’m doing this correctly but, alas, NOT.
 
As a footnote, I have used the body portion of this function in a field level script with no problem, but I don’t know where the error on line one is because there are no parameters to put between the parenthesis so far as I can see.
 
Here is the script and error message I’m getting. Would appreciate an assist with what is missing.
 
function ResetBE&B()
{
var fields = new Array()
fields[0] = "txtBE" //this is a non-terminal field name of the first of 3 sets of fields being reset
fields[1] = "txtB" //2nd non-terminal field name
fields[2] = "cbo.BE.Type" //a single field name
this.resetForm(fields)
}
 
Error message: “missing ( before formal parameters1"

David D

My Product Information:
Acrobat Pro 9.4, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Accepted Answer
You can't use an ampersand (&) in a function's name. It's a reserved character.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

David Dunn
Registered: Oct 28 2010
Posts: 116
Thank you. So simple. I read that too; should have known without having to be told.

David D