I tried few thing to fix, Nothing helped.
in server side script,
$array['content'] = "test";
echo json_encode($array);
This is working in javascript. But
$array['content'] = "<p>test</p>";
echo json_encode($array);
Not working. If i add any html tag, it is not working.
But they all are working in firefox and chrome.
This is the js handling the return value.
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");
Added the above two lines in php file.
<meta http-equiv="X-UA-Compatible" content="IE=8" />
Added the above in html file which handling the js. Still no use.
What could be the problem?
additionally, i dont see any error or warning in IE.
Internet Explorer 8 doesn’t support CORS in the XMLHttpRequest object which jQuery is using
ie8 uses XDomainRequest object
jQuery doesn’t support XDomainRequest by default.
check this An update is available for the native JSON feature in Internet Explorer 8