I have:
<script>
$('#email').on('blur', function(){
email = $(tihs).val();
$.ajax({
type: "POST",
url: "ajax.php",
data: {
'email': email,
'job': 'check',
},
dataType: "JSON",
success: function (response) {
// the response from PHP is smth like:
// {"status":"failed","reason":"email_not_validated"}
// now I want to:
if(response.status == 'success'){
}else{
}
}
})
});
</script>
This seems to work on every browser except IE, why is that?
Am I doing the right thing? the only thing which I need is to access the returned data like response.status
and response.reason
.
Thanks for helping