1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| $.ajax({
type: "POST",
url: "/scripts/checkMail.php",
data: "mail="+strEmail,
beforeSend : function ()
{
$('#verifMail').html('Email en cours de vérification <img src=\"images/email_loader.gif\" /> ')
},
success: function(data)
{
result = parseInt(data);
if (result==0)
{
$('#verifMail').html('Email non valide.');
document.getElementById('verif').value = '0';
document.getElementById('mail').style.border="2px red solid" ;
}
if ( result == 1)
{
$('#verifMail').html('Email valide.');
document.getElementById('verif').value = '1';
document.getElementById('mail').style.border="2px green solid" ;
}
},
}); |