[jQuery] problem with ajax success

[jQuery] problem with ajax success


I have this :
function verif_subdomain(name)
    {
        var r = '';
        $.ajax({
            type: "POST",
            url: "verif_subdomain.php",
            data: "subdomain=" + name,
            success: function(msg){
                r = (msg==1)?'ahah':'plop';
            }
        });
        return r;
    }
I search to attrib result of verif in : r : but r is not modified and
stay empty.
Do you know if it possible to change value and she stay after ajax
call ?
(I have see the possibility with : .responseText but if i want to use
this solution, i must define asyn : false and i don't want this
behavior)