Jquery Ajax works fine on my localhost but not working on server

Jquery Ajax works fine on my localhost but not working on server

Hi, Everybody, I'm done searching and can't find the solution to my problem, Hope, somebody's going to save my life.
I've enclosed two ajax requests in jquery onclick event having id (manifest_id), the first ajax request having url (get_manifest_record.php) returns html table and it displays Fine, but the second ajax request having url (populate_field_man.php) is not getting fired, it should populate some of html textbox fields, and the most important thing is that it works fine on my local machine but not on server. 
How do I make the other ajax request work on server?

$(document).ready(function(){
      $(document).on('click','#manifest_id',function(e){
var id = $(this).html();
var behaviour = "incoming";
$("#print_manifest").removeAttr('disabled');
$.ajax({
type : "POST",
url : "get_manifest_record.php",
data : {'manifest_id' : id , 'function' : behaviour},
success : function(data)
{
$('#results').html(data);
$("#print_id").attr("value",id);
$("#print_function").attr("value",behaviour);
},
dataType : "html"
});
$.post("populate_field_man.php", { id : id , behaviour : behaviour },  
            function(result){
$("#form_field2").val(result.dispatched_date);
$("#form_field3").val(result.received_date);
$(".p_bag").val(result.p_bag);
$(".hub_city").val(result.hub_city);
$(".to_city").val(result.to_city);
$(".time").val(result.time);
        },"json"); 

});
});

I've searched alot and tried many things but no gain, this is my first ever post here.
Please take a look and let me know what I should do to get rid of this?