私は初心者なので、簡単に行きます:
この $.ajax 関数が xhr データを正しい場所に追加しない理由がわかりません。
// gets the cache data from our php file
function getcaches() {
$.ajax({
method: 'get',
url: "php/findcache.php",
dataType: "json", // return type data is json
success: function(data){ // <-- data is in json format
//parse the json data
$('#caches').append($('<p>' + data[0].name + '</p>'));
},
error: function(data) {
console.log('error');
}
});
return false;
}
それが関連するJavaScriptです。firebugでデータを確認できるので、データがオブジェクトに適切に保存されていることはわかっています...
[OU0397] => stdClass Object
(
[code] => OU0397
[name] => A Mighty Oak in the Open
[location] => 28.527633|-81.125167
[type] => Virtual
[status] => Available
)
私は自分が間違っていることを理解していません。ポインタはありますか?