D
David
Hey can anyone help me convert a javascript array into a ruby array.
Ive been struggling with this since friday to no avail. This is the
function with the ajax.request call that is supposed to convert the
array using JSON, but I keep getting a 422(Unprocessable Entity)
error. Im not sure what is wrong.
function test()
{
for(i=1;i<22;i++){
if (document.getElementById(i+'d').className ==
"selected"){
myArray.push(i);
}
}
new Ajax.Request('/appointments/array/',
{method:'put',postBody:"'data='+myArray.toJSON"});
}
Thanks for any input!
Ive been struggling with this since friday to no avail. This is the
function with the ajax.request call that is supposed to convert the
array using JSON, but I keep getting a 422(Unprocessable Entity)
error. Im not sure what is wrong.
function test()
{
for(i=1;i<22;i++){
if (document.getElementById(i+'d').className ==
"selected"){
myArray.push(i);
}
}
new Ajax.Request('/appointments/array/',
{method:'put',postBody:"'data='+myArray.toJSON"});
}
Thanks for any input!