i want to pass the return from a "child" (i don't know the correct term) function to the return in the parent function... how is the correct way to do this? check_data() isn't returning true or false
function check_data(type,field){
var chkvalue = $(field).val();
$.post("mods/ajax.fieldchk.php", {
chkvalue: chkvalue,
type: type
},
function(result){
if(result==0){
$(field).css({'background-color': '#faa', 'border': '1px solid #f00'});
return false;
}else if(result==1){
$(field).css({'background-color': '#afa', 'border': '1px solid #0f0'});
return true;
}
};
}
thnx