Trying to submit data to a server-side script via jquery post failed. I get nothing. What are the possible reasons behind it? Is it that there is a problem with it? It works well on other servers. But only one server, it failed. Please help me resolve this. Below is is the jquery code:
$(".email_validator").blur(function() {
var clientEmail = $(".email_validator").val();
$.post("http://website.com/svr/tmb/verify",
{ email:clientEmail },
function(data) {
if(data.error) {
alert(data.message);
$(".email_validator").val("");
} else {
alert(data.message);
}
},
"json");
});
Extract of the server side:
if(!empty($_POST['email']))
{
if(isValidEmail($_POST['email']))
{
exit(json_encode(array('error'=>false,'message'=>'your email ok')));
}
else
{
exit(json_encode(array('error'=>true,'message'=>'your email is blocled')));
}
}
else
{
exit(json_encode(array('error'=>true,'message'=>'no data received')));
}
But this did nothing...