PDA

View Full Version : How to send an array as a parameter in an Ajax Request?



dbassett74
10 Jul 2010, 3:14 PM
I'm trying the following, but it seems the "paths" array is not being sent correctly as I can't see the actual values:



var paths = ["path1", "path2"];
Ext.Ajax.request({
url: "process.aspx/Delete",
params: {
paths: paths
},
success: function(response, options) {
console.log("success");
},
scope: this
});


How do you properly send an array as a parameter in an Ajax Request?

dbassett74
10 Jul 2010, 3:27 PM
Nevermind, seems this does work. It was the way I was handling it on the server side that was the problem.