jQuery bValidator issue - async
<p>Does anyone know a way to make this ajax function work without disabling async? Asynx=false freezes everything up...</p>

<pre><code>&lt;script type="text/javascript"&gt;   
    $(document).ready(function () {
        $('#form5').bValidator();
    });

    function checkUsername(username){

        var ret = false;

        $.ajax({
            type: 'POST',
            url: 'checkuser.php',
            sync: false, // Want to remove this
            data: {'username':username},
            success: function(data){
                if(data == 'ok')
                    ret = true
            }
        });

        return ret;
    }
&lt;/script&gt;
&lt;form id="form5" method="post"&gt;
    &lt;p&gt; Choose username:
        &lt;input type="text" data-bvalidator="checkUsername,required" data-bvalidator-msg="This username is not valid or already taken."&gt;
    &lt;/p&gt;
    &lt;p&gt;
        &lt;input type="submit" value="Submit"&gt;
        &lt;input type="reset" value="Reset"&gt;
    &lt;/p&gt;
&lt;/form&gt;
</code></pre>

<p><a href="http://karmela.fsb.hr/~bmauser/bvalidator/documentation.html#serversidevalidation" rel="nofollow">http://karmela.fsb.hr/~bmauser/bvalidator/documentation.html#serversidevalidation</a></p>
