$.ajax({
type: "POST",
url: "check-email",
data: {email: "name@example.com"},
success: function(data)
{
// success part here
},
error: function(xhr)
{
alert(xhr.status);
}
});
This will call another PHP file. But the sad thing is the error
part is executed always with xhr.status
printing as 0. What would be the problem?
Note:
1. This works perfectly in the local.
2. Both the script, check-email page is located in the same server.
3. The server is secured with https and it is in WWW version.
Update:
error: function(jqXHR, textStatus, errorThrown)
{
alert(textStatus, errorThrown);
}
This prints simply as "error".