Пожалуйста имейте ввиду, что этот пользователь забанен
Ответ из PHP отправляю через echo json_encode
if (xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200)
{
parse=JSON.parse(xhr.response);
error=parse.error;
if (parse.error == "error") {location.reload();} else {}
}
} VM1551:1 Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>
at xhr.onreadystatechange (cameraService.js:48:19)
if (xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200)
{
parse=JSON.parse(xhr.response);
error=parse.error;
if (parse.error == "error") {location.reload();} else {}
}
} VM1551:1 Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>
at xhr.onreadystatechange (cameraService.js:48:19)