jQuery getJSON のコールバック関数は、要求されたファイルが正常に読み込まれたにもかかわらず、Internet Explorer 9 で呼び出されることはありません ([ネットワーク] タブで確認しました)。
var user = 1;
$.ajaxSetup ({
cache: false
});
var fileUrl = "/path/to/file.php";
var fetchQuestions = function(kanji)
{
alert('this fires');
$.getJSON(
fileUrl,
{action: "get-q", kanji: kanji, user: user},
function(json)
{
alert('this does not fire');
questions = json;
currentItem = json.info.kanji;
showStart(json.info);
}
);
};
- 返されるデータは有効な json です
- 他のすべてのブラウザでは問題なく動作します
- 要求されたファイルは 200 OK および Content-Type application/json でロードされます
- ファイルのどこにも console.log() 呼び出しはありません
- コンソールにエラーがないこと (IE9 またはその他のブラウザー)
何か案は?
返される JSON は次のとおりです。
{"info": {
"kanji": "線",
"meanings": "line",
"desc": "",
"words": [{"audio":"/jp/files/audio/words/線_せん","kanji":"線","en":"line","jp":"せん"},{"audio":"/jp/files/audio/words/地平線_ちへいせん","kanji":"地平線","en":"horizon","jp":"ちへいせん"},{"audio":"","kanji":"内線","en":"phone extension, indoor wiring, inner line","jp":"ないせん"},{"audio":"","kanji":"直線","en":"straight line","jp":"ちょくせん"},{"audio":"","kanji":"脱線","en":"derailment, digression","jp":"だっせん"},{"audio":"","kanji":"線路","en":"line, track, roadbed","jp":"せんろ"},{"audio":"","kanji":"水平線","en":"horizon","jp":"すいへいせん"},{"audio":"","kanji":"新幹線","en":"shinkansen","jp":"しん・かん・せん"}]
},
"spots": [{"kanji":"\u5c71","rand_ind":"32"},{"kanji":"\u68ee","rand_ind":"47"},{"kanji":"\u5225","rand_ind":"76"},{"kanji":"\u98ef","rand_ind":"127"},{"kanji":"\u98f2","rand_ind":"175"},{"kanji":"\u9b5a","rand_ind":"203"},{"kanji":"\u5354","rand_ind":"252"},{"kanji":"\u9752","rand_ind":"265"},{"kanji":"\u9032","rand_ind":"302"},{"kanji":"\u805e","rand_ind":"310"},{"kanji":"\u8a08","rand_ind":"311"},{"kanji":"\u4ea4","rand_ind":"362"},{"kanji":"\u4f1a","rand_ind":"367"},{"kanji":"\u53d7","rand_ind":"404"},{"kanji":"\u5973","rand_ind":"463"},{"kanji":"\u90e8","rand_ind":"469"},{"kanji":"\u4e16","rand_ind":"476"}],
"known": "月,後,前,生,?"}