Expand my Community achievements bar.

Getting "missing ; before statement" on drop down list

Avatar

Level 7

I'm getting a "missing ; before statement


97:XFA:form1[0]:page3[0]:nameAccnts[0]:DropDownList1[0]:exit on a drop down list when selecting an item.

I'm not sure what to look for in the code. Any thoughts? It's a lengthy script but I can attach the form.

Thanks

MDawn

7 Replies

Avatar

Level 10

Hi Margaret,

The line you have given indicates that the problem is on line 97 of the script in the exit event of the DropDownList1. See https://www.livecycleusers.com/members-only/niall/livecycle-stuff/photos.html#photoid=2

You would need to share the lines of code above and below this.

Also if you click the "check syntax" button on the top of the Script Editor window, it should highlight the error. Then check the warnings tab.

Niall

Avatar

Level 7

I found it. A misstated set of quotes. Thanks for your help.

Margaret Dawn

630-850-1065

Avatar

Level 7

I actually didn't find the problem. Here are lines before and after the line that was indicated to be the problem:

xfa.resolveNode("address.TextField9").raw Value = "";

xfa.resolveNode("address.Name").rawValue = "Follett Higher Education Group";

xfa.resolveNode("address.Address").rawValue = "River Grove - Technical Services";

xfa.resolveNode("address.Address[1]").rawValue = "Attn: Colleen Carroll";

break;

Margaret Dawn

630-850-1065

Avatar

Level 10

Hi Margaret,

One thing that strikes me if that you have two objects called "Address". However in the script you are only resolving the second one correctly. In the first one you are missing the instance number [0].

xfa.resolveNode("address.Address[0]").rawValue = "River Grove - Technical Services";

Generally I would not resolve each object, unless the object was in a loop or on a Master Page.

If you have named pages, subforms and objects, then you should be able to use a relative reference, which I believe to be more efficient.

address.Address.rawValue = "River Grove - Technical Services";

Also I would be inclined to give each Address object a unique name, like "Address1" and "Address2", which means that you don't need to resolve each instance of an object with the same name.

I am working on an example, watch this space.

Hope that helps,

Niall

Avatar

Level 7

Thanks.

Margaret Dawn

630-850-1065

Avatar

Level 7

I'm looking forward to the example. Thanks,

Margaret Dawn

630-850-1065