Problem accessing a global array from
Hi all,
I am trying to use values of a global JS array (myCells) in the button.onClick function. However, the alert returns "[object]" instead of the array values "A", "B", "C". Therefore, I cannot use the array to do any further processing after the button is clicked.
The code is:
var myCells = new Array(''A", "B", "C")
var button1 = new AW.UI.Button;
button1.setId("button1");
button1.setControlText("Refresh quotes");
document.write(button1);
button1.onClick = function() {
alert(myCells);
};
Any idea, why I can't read the global array in the onClick function?
Thanks, Alexander
I am trying to use values of a global JS array (myCells) in the button.onClick function. However, the alert returns "[object]" instead of the array values "A", "B", "C". Therefore, I cannot use the array to do any further processing after the button is clicked.
The code is:
var myCells = new Array(''A", "B", "C")
var button1 = new AW.UI.Button;
button1.setId("button1");
button1.setControlText("Refresh quotes");
document.write(button1);
button1.onClick = function() {
alert(myCells);
};
Any idea, why I can't read the global array in the onClick function?
Thanks, Alexander
Alexander
July 9,