私は修正するためにいくつかのことを試みましたが、何も役に立ちませんでした。
サーバーサイドスクリプトで、
$array['content'] = "test";
echo json_encode($array);
これはjavascriptで動作しています。しかし
$array['content'] = "<p>test</p>";
echo json_encode($array);
動作していません。HTMLタグを追加しても機能しません。しかし、それらはすべてFirefoxとChromeで動作しています。
これは、戻り値を処理する js です。
function showResponse(responseText) {
$('.form_result').html(responseText.formData);
alert(responseText.formData);
}
function submitButton1() {
var options = {
beforeSubmit: showRequest, // pre-submit callback
success: showResponse, // post-submit callback
dataType: 'json',
cache: false
};
// bind form using 'ajaxForm'
$('#form').ajaxSubmit(options);
}
header("Cache-Control: no-cache, must-revalidate");
header("Expires: 0");
上記の 2 行を php ファイルに追加しました。
<meta http-equiv="X-UA-Compatible" content="IE=8" />
jsを扱うhtmlファイルに上記を追加しました。まだ駄目。
何が問題なのですか?さらに、IE でエラーや警告が表示されません。