
function getCategories()
{
    var data    =   new FormData();
    data.append("request", "get_categories");
    $.ajax
    ({
        type: "POST",
        enctype: 'multipart/form-data',
        url: "../../controllers/category.php",
        data: data,
        processData: false,
        contentType: false,
        cache: false,
        timeout: 600000,
        async: true,
        success: function (response) 
        {
            response    =   JSON.parse(response);
            if((response["html"]))
            {
                $("#CategoriesWrapper").html('');
                $("#CategoriesWrapper").html(response["html"]);
                $("#CategoriesTable").DataTable();
            }

        },
        error: function (e) 
        {
            console.log("ERROR : ", e);
        }
    });
}














$(document).ready(function()
{

    getCategories();

});