Expand my Community achievements bar.

Variables and arrays global and local scoping issues

Avatar

Level 1

First I am new to Javascript and especially so to Livecycle Javascript.

I am trying to make a form where:

1. There is a table in the Main Form. Through the use of buttons the user turns on the visibility of subforms on and off. (got this working)

     The subforms have check boxes which when selected will display the appropriate text in TextFields in the Table in subform0 (main page).

     I would like to define and initialize the Array once (hopefully) - when the page loads (my thinking!  in the form1.initialize section of scripting). This array would then be able to be accessed by and avaiable to several (about 6) subforms to get and put values into the main table in subform0.

Any feedback on the scoping of variables would be appreciated. Where would I define these for a form? (Do I use File:Page properties: Variables tab? or do something else in the scripting section. Any other references where I could learn more on scoping in livecycle javascript?

2.  I am also having trouble in learning how to access various instances of a textField. (eg TextField1[0], TextField1[1], TextField1[2], etc). This would allow me to loop through each of the instances because I can't use getFieldById in livecycle D ES.

K_Nep.

1 Reply

Avatar

Level 1

No problem guys. The information is con

tained in the book by J.P.Terry: Creating D

ynamic Forms with Adobe LiveCycle Designer.

Adobe Press.

Thanks anyway.

K