jQuery AJAX callback
<p>I'm having a difficult time trying to get this javascript function to return false inside of a .post() function.</p>

<p>Is this even possible? or is there another way to do a simple ajax check to validate the voucher code is in the database.</p>

<pre><code>function check_options(){       
        var voucher_code = $('#voucher_code').val();
        $.post(baseURL+"ajax.php", { tool: "vouchers", action: "check_voucher", voucher_code: voucher_code },
            function(data) {
            if(data == 'invalid'){
                // NEED TO RETURN FALSE FOR THE MAIN FUNCTION
            }
        });

}
</code></pre>
