Answer the question
In order to leave comments, you need to log in
What policy can block the .responseText javascript procedure in IE?
I have a page on which I make a post-request using pure javascript. This is a key requirement, no jquery!
Here is the code:
varxmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
xmlhttp.open("POST", ' 10.141.2.13/dark_soft/map/inc/2.php ', true);
xmlhttp.send(); // Sending a POST request
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==0) document.getElementById('TestBox').innerHTML='stage0';
if (xmlhttp.readyState==1) document.getElementById('TestBox').innerHTML='stage0 - stage1';
if (xmlhttp.readyState==2) document.getElementById('TestBox').innerHTML='stage0 - stage1 - stage2';
if (xmlhttp.readyState==3) document.getElementById('TestBox').innerHTML='stage0 - stage1 - stage2 - stage3';
if (xmlhttp.readyState==4)
{
document.getElementById('TestBox').innerHTML='stage0 - stage1 - stage2 - stage3 - stage4';
document.getElementById('TestBox').innerHTML='stage0 - stage1 - stage2 - stage3 - stage4'+xmlhttp.responseText;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question