$.post() callback executed no data passed
hello everyone. here is my server side code:
$arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);
echo json_encode($arr);
here is my javascript:
$.post($SERVER, {op:"one", test:"two"} ,HandleJSON(), "json");
}
function HandleJSON(data)
{
alert("being called");
alert(data);
return;
}
when i call alert(data), it says it is "undefined". i am new to jQuery, but this appears to mean that no data is being passed to the callback function even though i know the $.post() executed properly (the server side code is executing, and the other alert() tells me that it had a successful result and the callback is being made.
any ideas?