David wrote:
Hey can anyone help me convert a javascript array into a ruby array.
If you told us what a "ruby array" is, the chances for that would increase
considerably.
[...] 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.
Useless information, without knowing what was going to be processed where
and how.
Im not sure what is wrong.
Neither can anyone else, unless you told us ...
function test()
{
for(i=1;i<22;i++){
if (document.getElementById(i+'d').className ==
"selected"){
myArray.push(i);
what `myArray' is, ...
}
}
new Ajax.Request('/appointments/array/',
{method:'put',postBody:"'data='+myArray.toJSON"});
what `Ajax.Request' is.
BTW: You "forgot" to declare `i' a variable.
}
Thanks for any input!
Likewise.
<http//jibbering.com/faq/>
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee