私のjavascriptでは、
$.ajax({
type: 'GET',
url: 'http://133.333.33.33/reporting/summary_table.php?loc_id='+locid+'&loc_type='+loctype+'',
async: false,
success: function(data) {
alert(data);
},
dataType: 'json'
});
私のサーバー側にはこれがあります、
$result = mysql_query($query);
$rows = array();
while ($row = mysql_fetch_assoc($result)) {
$rows[] = $row;
}
echo json_encode($rows);
FFでfirebugをチェックすると、ajaxの応答は何もなく、代わりにエラーが発生します。私は何を取りこぼしたか?