私のページには ajax 呼び出しがあり、この特定のタスクには jQuery ライブラリを使用しています。ajax 呼び出しの応答で、応答メッセージを解析したいと思います。
問題は、このコードが IE 6-7-8 でエラー メッセージを表示することです (奇妙なのは、IE 9 が完全に動作し、Firefox が完全に動作することです)。
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Mon, 12 Aug 2013 08:20:03 UTC
Message: Object doesn't support this property or method
Line: 94
Char: 4
Code: 0
どんなアイデアでも大歓迎です。この行がエラーを生成しているように見えます:
response_str = $(server_response).filter("#response").val();
コード関連の部分をコピーします。
$.ajax({
type:'POST',
url:'ajax.php',
processData: 'false',
data:{
data1: 'val1'
ajax:'true'
},
dataType: "html",
contentType: ''application/x-www-form-urlencoded''
})
.done( function(server_response) {
//the following line generate error
response_str = $(server_response).filter("#response").val();
}
})
}');