1
いずれかが助けてくれます。 jquery mobileでWebサービスを呼び出すために次のコードを使用しています。しかし、私は "Undefined"というエラーが出ます。間違いを犯した箇所を教えてください。前もって感謝します。JQueryMobile - AJAX - JSON構文解析
コーディング:
$.ajax({
type: 'POST',
url: "http://jquery.sample.com/nodes.json",
data: ({search_keys :theName}),
dataType: 'json',
timeout: 5000,
success: function(msg)
{
console.log(msg); //here, I can see the result in browser.
alert(msg.message); //Undefined Error
},
error: function(xhr, status, errorThrown)
{
alert(status + errorThrown);
}
});
JSON出力
[ { "タイプ": "ビジネスプロファイル"、 "タイトル": "レイクビューレストラン"、 "ユーザー":」 「」、 「日付」:「1280144992」、 「ノード」:{ "nid": "67916"、 "タイプ": "business_profiles"、 "言語":"」、 "UID": "1"、 "状態": "1"、 は、 "作成": "1278994293" } } ]
おかげニックCraver。 – Finder
@Girija - 歓迎:) –