Hello
I want to have a Array declared in the form, and that Array should VISIBLE to every where of the form.
Meaning, i can use tthat aray in every page, every subform, every text field to append the elements
And to loop that array in some button (on click event).
PLs. let me know how can i declare a array that is GLOBAL in scope, really global? at what level i hv to declare it? at root node level (say, my form name is VISITORinfio, so, keeping curson on this node and declaring array in readDoc event? )
I tried with these options but not working at all!!
Solved! Go to Solution.
Views
Replies
Total Likes
Srinivas,
I tried on my system and its working!! Try creating a global variable with the help of menu : Form -> Properties -> Variables (Tab)
name the variable a1.
Now go to any text field or form initialize event and write
form1.Page1.TextField1::initialize - (JavaScript, client)
a1[0] = "name1";
a1[1] = "name2";
//when you assigned the variable like a1[0], it automatically presumes it is a array.
Now any click event of a button or the event you want to get the values assigned to this array,
form1.Page1.Button1::click - (JavaScript, client)
app.alert(a1[0]);
app.alert(a1[1]);
Let me know if you see any difficulties in using the global array.
kc
Views
Replies
Total Likes
Pls. help me that let me know how to declare a GLOBAL SCOPE array(i did by using var, with out var key word, i did at TOP level, even i dont hv any functions!) - Thank you
Views
Replies
Total Likes
Hi Srinivas,
Did you try declaring a global variable using File -> form properties -> Variables (Tab).
I know that the scope of these variables is global. But i'm not sure it can be used as an array or not.
----
kc
let me try pls, Thank you
Views
Replies
Total Likes
Sorry, its not working!!
I dont understand, why adobe made this simple & popular(every one needs to hv an array with a GLOBAL scope) requirement so complicated? i searched in the google, but, did not find any workabale solution.
Thank you
Views
Replies
Total Likes
Srinivas,
I tried on my system and its working!! Try creating a global variable with the help of menu : Form -> Properties -> Variables (Tab)
name the variable a1.
Now go to any text field or form initialize event and write
form1.Page1.TextField1::initialize - (JavaScript, client)
a1[0] = "name1";
a1[1] = "name2";
//when you assigned the variable like a1[0], it automatically presumes it is a array.
Now any click event of a button or the event you want to get the values assigned to this array,
form1.Page1.Button1::click - (JavaScript, client)
app.alert(a1[0]);
app.alert(a1[1]);
Let me know if you see any difficulties in using the global array.
kc
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies