Hi,
Problem is in your ValidationMyForm.
function validateMyForm() {
var returnedVal = true;
.
.
.
$.post('ajax/checkUsername.php',{ username:username },function(data){
.
.
.
if(is used by another)
{
returnedVal= false;
else
ShowError;
}return returnedVal;}, "json");
return returnedVal;
}