Input data not array

Posted by schneim 
Input data not array
May 05, 2009 03:30PM
Hi,

I've got an error when I try to load my array data’s.

I’am calling per JavaScript a Method form my ASP File:
var myData = PageMethods.test();

this return a array like

object[,] ga = new object[3,2];
ga[0, 0] = "'AAA'";
ga[0, 1] = 42;
ga[1, 0] = "'BBB'";
ga[1, 1] = 38;
ga[2, 0] = "'CCC'";
ga[2, 1] = 10;

return ga;


can someone tell me why this doesnt work???

THX
Re: Input data not array
May 06, 2009 09:38AM
OK i try somethin new:

var myJSON = { "00": "AA",
"01": 11,
"10": "AA",
"11": 11,
"20": "AA",
"21": 11,
};

//var myData = new Array(['AAA', 42], ['BBBB', 38], ['CCC', 10]);
var myData = new Array();
myData[0] = [myJSON.00, myJSON.01]);
myData[1] = ['AAA', 42];
myData[2] = ['AAA', 42];

Do somebody know why this doesn't work???
Re: Input data not array
May 11, 2009 11:22AM
I guess it's because the 00 and 01 properties, they should not begin with a number even if they were defined as strings in the object definition. But using myJSON['00'] and myJSON['01'] will work.

Sabin

--------------------
JS Charts - Created by Smartketer LLC



Edited 1 time(s). Last edit at 05/11/2009 11:23AM by sabinmunteanu.
Sorry, you do not have permission to post/reply in this forum.