Ajax loading doesnt work when form validates
<p>Im using a form to upload files to my server and I want to load a progress bar when the form validates. This is code I have with jQuery:</p>

<pre><code>
$(document).ready(function(){
    $("#uploadform").submit(function(e){
        var valid_form = validateForm();

        if (valid_form){
            $("#pb").load("/php/progressbar.php");
        }
        return valid_form;
    });
});</code></pre>

<p>The problem is I get this message after submit: </p>

<pre>GET http://ftplink.wedo/php/progressbar.php undefined (undefined)</pre>

<p>But the weird thing is that I tried inverting the condition of the IF and when the form doesnt validate, the ajax loading actually happens. What is going on??</p>
