$(document).ready(function()
{
$.ajax({
method: "get",
url: 'ctr_seearmylist.php',
dataType: 'json',
data: 'get="squad"',
success: processSquads()
});
});
function processSquads(response)
{
alert(response);
}
Why isn't it working? How can I use the Json result that I'm getting? The Json result looks like this[[1,2]][[1,2]]
This is how the php function that is called looks like: {...... $temp[0]=$id; $temp[1]=$squad_id;
$result[]=$temp;
}
$result=json_encode($result);
return $result;
I looked at the response I get in firebug and I receive this: [["1","12"],["2","3"],["3","7"]] but I can't manage to write it out. I would want to write out just 1, 2, 3, but I can't even write it as it is.
I should mention that I tried to parse it using jQuery.parseJSON, but in the function process squad doesn't even get send the parameter. what am I doing wrong?