Hi anyone see why my alert won't work?
<script type="text/javascript">
function SubmitForm(method)
{
var login = document.form.login.value;
var password = document.form.password.value;
$.post("backend.php", {
login: login,
password: password,
method: method},
function(data){
alert(data.message);
console.log(data.refresh);
}, "json");
}
</script>
Response from backend.php is
backend{"message":"Log in credentials are not correct","refresh":"false"}