function check_username(){
$.ajax({
type: "POST",
dataType: json ,
url: "/ajax/check/username.html",
data: "via=ajax&username="+$( input[name=register_username] ).val(),
success: function(msg){
if(msg.response==false){
register_username.parent().css( background-color , #db2e24 );
register_username.parent().parent().find( td:last-child ).text(msg.message);
register_username.focus();
return false;
} else {
register_username.parent().css( background-color , #fff );
register_username.parent().parent().find( td:last-child ).text("");
return true;
}
}
});
}
I m sorry if my English isn t good -- English is not my native language. Back to the topic, why does the function above always return false? FYI : the JSON is OK