Hi,
bin ganz neu im Gebiet JSON und habe ein Problem:
Ich schicke eine Anfrage per jQuery-Ajax an eine PHP-Datei, die mir die Zeit und eine ID zurückgibt.
Das alles wird in php per json_encode passend gemacht.
Das kommt also an:
|
Source code
|
1
|
{"n_time": 1283971437, "id": 1}
|
Was ist an dem Javascript falsch:
|
JavaScript Code
|
1
2
3
4
5
6
7
8
9
|
$.ajax({
url: m_url,
type: 'post',
dataType: 'json'
},
function (data) {
alert(data.n_time);
}
);
|