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

missing ; before statement

mthoes
Registered: Jan 22 2008
Posts: 11

I am designing a form that if the Yes box is selected then a hidden subform appears to be completed, if the No box is selected a different hidden form appears to be completd.

The Radio buttons are in their own subform
Yes selection should show SubForm - SubFormCAPExInfo
No selection should show SubForm - SubFormPOInfo

I have included the script and the debugger message. I am totally new at this and may even end up paying someone to finish this.

MeLinda

Java script
----- form1.ECRForm.SubFormCAPExCheckbox.CAPExYN.Yes::click: - (JavaScript, client) ----------------

if (CAPExYN.Yes = True)
this.presence SubFormCAPExInfo = "visible";
else (CAPExYN.No = True)
this.presence SubFormPOInfo = "visible",

This is the message I receive if Yes is selected. Nothing happens is No is selected.

Debugger Message:

Acrobat JavaScript Debugger Functions Version 7.0
Acrobat Database Connectivity Built-in Functions Version 8.0
Acrobat EScript Built-in Functions Version 8.0
Acrobat Annotations / Collaboration Built-in Functions Version 8.0
Acrobat Annotations / Collaboration Built-in Wizard Functions Version 8.0
Acrobat Multimedia Version 8.0
Acrobat SOAP 8.0

missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:No[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:No[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
syntax error
4:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SubFormCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click

My Product Information:
LiveCycle Designer, Windows
mthoes
Registered: Jan 22 2008
Posts: 11
I forget the Language is JavaScript and Run At: Client
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
The line:

this.presence SubFormPOInfo = "visible",

Ends in a coma and not a semicolon.

You could also have a problem with you field naming because LiveCycle Designer does not support AcroFroms hierarchical naming structure.

George Kaiser

mthoes
Registered: Jan 22 2008
Posts: 11
I added the ; at the end of the statement. Change some of the field names (shortened). Below is the script and responding error message

Language: Java script Run At: Client

----- form1.ECRForm.SFCAPExCheckbox.CAPExYN.Yes::click: - (JavaScript, client) ---------------------

if (CAPExYN.Yes = True)
this.presence SFCAPEx = "visible";
else (CAPExYN.No = True)
this.presence SFPO = "visible";


This is the message I receive if Yes is selected. Nothing happens is No is selected.

Debugger Message:

Acrobat JavaScript Debugger Functions Version 7.0
Acrobat Database Connectivity Built-in Functions Version 8.0
Acrobat EScript Built-in Functions Version 8.0
Acrobat Annotations / Collaboration Built-in Functions Version 8.0
Acrobat Annotations / Collaboration Built-in Wizard Functions Version 8.0
Acrobat Multimedia Version 8.0
Acrobat SOAP 8.0

missing ; before statement
2:XFA:form1[0]:ECRForm[0]:SFCAPExCheckbox[0]:CAPExYN[0]:Yes[0]:click
frog55
Registered: Feb 5 2010
Posts: 3
Var f = this.getField("ValueA");
Var g = this.getField("ValueB");
event.Value = f.Value - g.Value;

Error message: missing ; before statement in line 1

How can I fix this?
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Since this is a LiveCycle Designer forum, I am assuming you are using LiveCycle Designer to create the form and not Acorbat form tools.

You need to write the code with the LiveCycle Designer JavaScirpt or FormCalc syntax. Also make
sure you spell and capitalize the properties as the program expects.

George Kaiser