function load_tabel(name_asset)
{
  var url_page = controller_url+'/tabel';

  var data = {
    asset: name_asset
  };

  if(data.asset != null)
  {
    $.ajax({
      url: url_page,
      type: 'POST',
      data: data,
      success: function(response){ 
        $('#'+name_asset).html(response);
      },
      error: function (xhr, ajaxOptions, thrownError) { 
       console.log(xhr.responseText);
     }
   });
  }
}

function update_data(name_asset)
{
  var data = {
    asset: name_asset
  };

  $.ajax({
    url: controller_url+'/update',
    type: 'POST',
    data: data,
    dataType:'json',
    success: function(response)
    {
      notif(response.eror, response.pesan);

      if(response.eror == 'success')
      {
        load_tabel(name_asset);
      } 
      else console.log(response);
    },
    error: function (xhr, ajaxOptions, thrownError) { 
     console.log(xhr.responseText);
   }
 });
}

function update_data_2(name_asset)
{
  var data = {
    asset: name_asset
  };

  $.ajax({
    url: controller_url+'/update_2',
    type: 'POST',
    data: data,
    dataType:'json',
    success: function(response)
    {
      notif(response.eror, response.pesan);

      if(response.eror == 'success')
      {
        load_tabel(name_asset);
      } 
      else console.log(response);
    },
    error: function (xhr, ajaxOptions, thrownError) { 
     console.log(xhr.responseText);
   }
 });
}