Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

POST is not working in IE11, GET works.

$
0
0

Hi,

There is a problem while execution of POST function using XMLHttpRequest, the same code works fine in IE8,

here is the code.

 if (window.XMLHttpRequest !== undefined)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  var httpOb=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  var httpOb=new ActiveXObject("Msxml2.XMLHTTP");
  }

 httpOb.open("POST",hostString,false);
 httpOb.setRequestHeader("Content-Type","text/xml");
 httpOb.send(xmlString);
 var headers = httpOb.getAllResponseHeaders();
document.write(httpOb.responseText);

I can clearly see the httpOb gets assigned to XMLHttpRequest, while debugging in IE11,

The error message is "The System Cannot locate the resource specified", and this error comes on httpOb.send(xmlString);

assuming the url is wrong, how can it work in IE8 and gets data??

please help me, it's kind of urgent.

Thanks,

Sarva.



Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>