現在、Phonegap と XUI を使用して Web アプリを作成しています。
XUI 経由で http リクエストを使用して、外部ドメインからデータを取得しています。
これは正しく機能しており、JSON データを正しく受け取りました。以下のデータ形式を参照してください。
({"first":"John","last":"Smith","HighScore":"75"})
だから今、私はjavascriptを使ってデータの個々のアセットにアクセスできるようにしたいと思っています.
x$('#test').xhr(URL,function() {
loggedin = this.responseText; // This is the data that has been received from the PHP file
if(loggedin != '1') // If not 1 then will let them in
{
alert(loggedin); // Alerts with the data recieved
}
else // Login incorrect
{alert('Sorry you login details were incorrect please try again.');}
});
おそらく簡単にできることはわかっていますが、それを理解できないようですので、どんな助けでも大歓迎です。
ありがとう、
ケイン