I tried to follow the code in anthem.js and it checks if it is an array. I am converting this code over from asp .net ajax, I can print both values correctly on an alert. I tried doing it the way in the example also:
[selectedID.value,f.elements["color"].value]
I get the first parameter but not the second. The array is of length 1.
var A = new Array ( 2 );
A[0] = selectedID.value;
A[1] = f.elements["color"].value;
if ( A instanceof Array )
{
alert("ARRAY");
}
Anthem_InvokePageMethod( 'SetColor',
A,
function (result) {}
);
( in my page )
[Anthem.Method]
public void SetColor(string [] par)
{
const int CONTROL_ID = 0;
const int COLOR = 1;
// GETS HERE
if (par.Length > 1)
{
// never gets here
}
}