The title is the error I get. ATM I am upgrading the api to a higher version. Now i got this error. I have tried to fix it but no chance for me. Can someone help?
The code that gives the error is
appendCalls(callList = JSON.parse(xhr.responseText));
The whole function:
function getCallList() {
var date = formatDate(currentDisplayDate);
callCounter = 0;
unansweredCalls = 0;
$('#callCounter').html('');
$('#spinner').addClass('display');
xhr=new XMLHttpRequest();
xhr.onreadystatechange=function() {
console.log("sd1");
if (xhr.readyState==4 && xhr.status==200) {
console.log("sd2");
appendCalls(callList = JSON.parse(xhr.responseText));
console.log("sd3");
}
}
xhr.open("GET","/api.php?f=calllist&date="+date,true);
xhr.send();
}
"appendCalls" is another function. If you need it I can post it.
Yeah I checked the output (idk why I don't thought about that) and saw I had an console output that was starting with an 'z'. It works now so Thanks!