i have problem with this query when i fill my email box with correct email it can validate and then ask me correct email and when i change my email box to empty it shows me correct email address. let check this http://www.icodecrew.com/register
if(email == "") {
$("span.val_email").html("Please Enter Your Correct Email-ID.").addClass('validate');
validation_holder = 1;
} else {
if(!email_regex.test(email)){ // if invalid email
$("span.val_email").html("Invalid Email!").addClass('validate');
validation_holder = 1;
} else {
$("span.val_email").html("");
$(document).ready(function(){
$("#email").change(function(){
$("span.val_email").html("<img src='spinner.gif' /> Please wait until we check...");
var email=$("#email").val();
$.ajax({
type:"POST",
url:"includes/checkemail.php",
data:"email="+email,
success:function(data){
if(data==0){
$("span.val_email").html("<img src='accept.png' title='available' />");
}
else{
$("span.val_email").html("<img src='error.png' /> E-Mail is Already registered");
}
}
});
});
});
}
}