Hi.
I have an associative array (an object with properties, implemented by an array object) which I would like to send by AJAX using jquery.
I have this sniped of code:
var params = {
'assoc_array': assoc_array,
'another_param': 'blah blah',
};
$.ajax({
url: "my_url.php",
data: params,
type: 'post',
});
Open in new window
the array is declared and filled this way:
var assoc_array = new Array();
function add_element(name,value){
assoc_array[name]=value;
}
Open in new window
I can see on firebug that only the other parameter is send by post, but not the assoc_array parameter. Why?
Thanks.
Thank you very much.