Javascript/jQuery undefined
<p>The reason that the title is named "jQuery / Javascript undefined" isn't because that I assume jQuery is a language, I do know that jQuery is a library of javascript language, just in case if some pedantic readers read this. The reason why I wrote that as the title is because I don't know what is wrong with the code, the jQuery or the Javascript (all jQuery's code compiled) is wrong.</p>

<p>Okay, back to the question, take a look at the following code, they give me an undefined value</p>

<pre><code>//username validation
function username_val(){
    username_value = $("input[name='username']").val();
    span_error = "span[name='username_error']";
    $(span_error).load('ajax_signup_username', {php_username_error:username_value},  function(){
        return true;
    });
}
</code></pre>

<p>I alerted this, and then an "undefined" is returned. I assumed that a true would be returned instead.</p>

<pre><code>function final_val(){
        alert( username_val() );
}
</code></pre>

<p><strong>EDIT:</strong> Some of you guys said that I can only return true on the success param, but I need this for validation, so if all of the validation methods are true, in the final_val will return true. The point is that I needed a true value in the final_val() or if you guys have other method to validate it, please tell me. Note: I'm in a hurry, so if I misunderstand your answer, please forgive me. I'll be gone for a few hours, until then I'll check your answers.</p>

<p>Thanks!</p>
