jQuery nested call returning server error 500
<p>I am not sure why this is happening, but the second jQuery call is giving a 500 error.  Is that because nested calls are not allowed? Or something else?  Thanks! Below is the whole code:</p>

<pre><code>&lt;script type="text/javascript" &gt;
$(function()
{
    $('#add_comment').bind('submit',function()
    //$("input[type=submit]").click(function()
    {
        var problem_id = $("#problem_id").val();
        var problem_comment = $("#problem_comment").val();  

        var dataString = 'problem_id='+ problem_id + '&amp;problem_comment=' + problem_comment;

        if( problem_id == '' || problem_comment == '' )
        {   
            $('.comment_success').fadeOut(200).hide();
            $('.comment_error').fadeOut(200).show();
        }
        else
        {   alert ("2");
            // Now check if the person is logged in.
            $.ajax({
                    type: "POST",
                    url: "/auth/check_login.php",
                    dataType: "json",
                    success: function(data)
                    {
                        alert ("3");
                        // Now add the comment!
                        $.ajax({
                            type: "POST",
                            url: "/problems/add_problem_comment_ajax.php",
                            dataType: "json",
                            data: dataString ,
                            success: function(data)
                            {
                                $('.add_message_success').fadeIn(200).show();
                                $('.add_message_error').fadeOut(200).hide();

                                // Here can update the right side of the screen with the newly entered information
                                alert ("success");


                            },
                            error: function(data)
                            {
                                alert ("error");
                            }
                        });
                    },
                    error: function(json)
                    {
                        alert ("error 2");
                        $("#loginpopup").dialog();

                        return false;           
                    }
            });         
        }

        return false;
    });
});
&lt;/script&gt;
</code></pre>
