jQuery passing an array to an AJAX call
- by Josh K
I have an array:
myarr = [];
I'm filling it with some values:
myarray['name'] = "Me!";
Now I want to transform that array into a set of Key = Value pairs. I though jQuery would do it automatically, but it doesn't seem to.
$.ajax
({
type: "POST",
dataType: "text",
url: "myurl",
data: myarr
});
Is there a way to do this or something I'm doing wrong? I get no javascript errors, and no serverside errors other then no POST information at all.