Form submit with ajax

Form submit with ajax

Hi everyone.
I'm facing problem in submitting 2 different forms at the same  page through ajax. Now my 1st form (Single form) is working correctly but 2nd form is posted to exact file but its not submitting the required form elements (inputs) its submitting my 1st forms elements..

Simply we have 1 page, 2 forms with different actions files.. how we can make it working in jquery.


$("#ajax-form").submit(function(){
        /*Loading gif*/
        $('#add-res').css({display: 'none',color: 'white'});
        $('#add-res').html("Loading..<img src='images/load_bar.gif' />");
        $('#add-res').fadeIn('slow');
        $.post(
            "urgent_work_sf.php", 
            $("#ajax-form").serialize(),
            function(data){
                if(data.success)
                {
                    //$('#add-res').css({display: 'none'});
                    $('#add-res').css({color: 'white'});
                    $('#add-res').html(data.message);
                    $('#add-res').fadeIn('slow');
                    reset_form();
                    load_contacts();
                }
                else
                {
                    //$('#add-res').css({display: 'none'});
                    $('#add-res').css({color: 'red'});
                    $('#add-res').html(data.message);
                    $('#add-res').fadeIn('slow');
                }
            },
            "json"
        );
    });




























Now this is I'm using for submitting the form. Its working perfectly with singe form at a page.