0

これは、アプリのホームページ用の JavaScript ファイル全体です。なぜそれがドキュメント対応リスナーに入らないのかについてのアイデアはありますか?

var photos;
forge.request.ajax({
  url: "http://photos-url.com/pics.json",
  dataType: "json",
  success: function(data) {
    photos = data;
  },
  error: function(error) {
    forge.logging.info("Couldn't fetch pics!");
  }
});

//logging output works here

$(function() {
  //logging output doesn't work here
  //I'm trying to append to the html here, but it never gets into this code
});
4

2 に答える 2

0

クロスドメイン リクエストは、セキュリティ上の理由から禁止されています (デスクトップ ブラウザーと同様)。ドメインへのリクエストを許可するように環境を構成する必要があります。詳細については、https://trigger.io/docs/current/api/modules/request.htmlをご覧ください。

于 2013-07-06T19:16:20.453 に答える