Execute ajax call right after all fields are filled
<p>So I need to check all the fields first:</p>

<pre><code>&lt;script type="text/javascript"&gt;
&lt;!--
    $(document).ready(function(){
        $("#loginform").submit(function(){
</code></pre>

<p>LIKE:</p>

<pre><code>        //CHECK INPUT
        $('#loginform :input:not(:button)').each(function(n,element){  
            if ($(element).val()=='') {
                $(".message").css('margin-top', '13px').html('&lt;p&gt;O campo '+element.id+' tem de ter um valor!&lt;/p&gt;').fadeIn("slow").delay(2000).fadeOut(1000);
                return false;  
            }
        });
</code></pre>

<p>AND MAKE AJAX CALL AFTER ALL FIELDS ARE FILLED:</p>

<pre><code>    //AJAX CALL
         $.post(...
         BLÁ BLÁ

    return false;
</code></pre>

<p>How can I submit values after check all fields?
Thank you as always.</p>

<p>UPDATE:</p>

<p>The solution "I found".</p>

<p>First validate in client side.
Second validate server side.</p>

<p>With the first measure several ajax call's are prevented before all fields are ok!
With the second "move" we prevent malicious intentions.</p>

<p>Thank you very much.
I been learning so much with you :)</p>
