Getting return validation from server

Getting return validation from server

In my website I have a custom form for an event requisition

It works but fails to get the "RES.txt" data that says "{"SUCCESS":"Request submitted successfully"}"

What am I doing wrong? I am using a combination of JavaScript and AJAX, I have simplified my code here to the issue I am having.

If I directly call the HTML snippet code that makes the appointment I get a download bar for "RES.txt" which is the response from the server. But I fail to parse it in my code :(. I feel stupid fighting this for so long.

<!DOCTYPE html>
<html>
<body>

<div id="demo"><h2>Let AJAX change this text</h2></div>

<button type="button" onclick="loadDoc()">Change Content</button>

<script>
function loadDoc() {
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (xhttp.readyState == 4 ) {
      document.getElementById("demo").innerHTML = xhttp.responseText;     
    }
  };
  xhttp.open("GET", "https://calendar.zoho.com/eventreq/654a5ab7a88f2fcefd8c90b93aacd51e698b57d7e7166773b8f1b9505b0080a34a64100d17cdc3bb?name=test name&mailId=kage.sabaku.no.gaara@gmail.com&date=12/02/2015&time=13:00&reason=test 2 Reason for Appointment", true);
  xhttp.send();

}

</script>

</body>
</html>