This is the code Im working with, the problem here is i should get content from server and show it in Dynamically created Div and php pages are working correctly

This is the code Im working with, the problem here is i should get content from server and show it in Dynamically created Div and php pages are working correctly

$(document).ready(function(){
$(function() {
$('#custom_timings_section, #custom_timings_section1').attr('disabled','true'); 
    $('#change_timings').change(function(){
        if($('#change_timings').val() == 'custom_timings_select') {
            $('#custom_timings_section, #custom_timings_section1').removeAttr('disabled'); 
        } else {
            $('#custom_timings_section, #custom_timings_section1').attr('disabled','disabled'); 
       
    });
});
$("#addcategory").click(function () {
var cat_name       = $('input[name=category_name]').val(); 
        var time_type = $("#change_timings option:selected").val();
var opening_time = $("custom_timings_section option:selected").val();
var closing_time = $("custom_timings_section1 option:selected").val();
            //data to be sent to server         
            var post_data = new FormData(); 
post_data.append( 'res_id', swe01245);
            post_data.append( 'cat_name', cat_name );
post_data.append( 'time_type', time_type );
            post_data.append( 'opening_time', opening_time );
            post_data.append( 'closing_time', closing_time );
            $.ajax({
              url: 'http://app.campusify.com/sample.php',
              data: '',
              processData: false,
              contentType: false,
              type: 'POST',
              dataType:'json',
              success: function(data){
 //load json data from server and output message     
                    if(data.value == true)
                    {
var id_cat = data.id;
                        alert("Category Created . .!");
                    }else if(data.value == false && data.message == exits){
                        alert("Category Already Exists . .");
}else {
                        alert("Unable To Create Category . .");
                        //reset values in all input fields
                        $('#create_category_dialog input').val(''); 
                        $('#contact_form select').val(''); 
                    }
                    
                  }
            });

    var currentdivs = $('.test').length();
    var div =  $("<div>", {
        id: currentdivs,
        text: currentdivs,
            "class": "test"
    }).appendTo("#boxes")
var del = $("<button>", {
id : "delete_category",
text: "Delete",
}).appendTo(div).click(function () {
var checkstr =  confirm('Are you sure you want to Delete '+ currentdivs +' Category?');
if(checkstr == true){
        $(this).parent().remove()
}else{
return false;
}
    });
var edit = $("<button>", {
id : "edit_category_button",
text: "Edit"
    }).appendTo(div).click(function () {
        $("#dialog-edit-form").dialog("open");
    });
});
});