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:'get',postBody:"'data='+myArray.toJSON"});

         }

Thanks for any input!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to