:: Forum >>

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.setControlText("Refresh quotes");

button1.onClick = function() {

Any idea, why I can't read the global array in the onClick function?

Thanks, Alexander
Friday, July 9, 2010
Just replace:
var myCells = new Array(''A", "B", "C")
var myCells = new Array("A", "B", "C")

(Note double quote char before A, instead of two single quote).
Saturday, July 10, 2010

This topic is archived.

Back to support forum

Forum search