XML Http Requests errors

79 views Asked by At

I'm trying to create a lookup that gets some xml, i have a php file that does the lookup and produces a block of xml. im using the code below to but i keep getting

Uncaught DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load at XMLHttpRequest.send (:1:774) and can't seem to get it working!

<script type="text/javascript">

function Lookup(){

var xhttp;
if (window.XMLHttpRequest) {
    xhttp = new XMLHttpRequest();
} else {
   // code for IE6, IE5
    xhttp = new ActiveXObject("Microsoft.XMLHTTP");
}


xhttp.open("post", "https://lookup.php", false);
xhttp.send();


var newData = xhttp.responseText;
var objhere = JSON.parse(NewData);

}
</script>

0

There are 0 answers