How can I dynamically loading datatable's data?

Hi experts.

I’m a beginner of web programming and I’m try to show some data using webix datatable.

But I have some questions.

  1. How could I loading data for datatable dynamically?
    For example, I request to some *.php, *.jsp, etc page for datatable’s data and
    want to load this data in datatable.
    of course, the return data’s type is JSONArray

  2. How could I auto refresh for renewal datatable?
    So, I want to renewal datatable for 5 seconds like…

Thank you.

(1) There is no need to any extra steps, just define an url through “url” property. And output the json data in the related server side script

{ view:"list", url:"data.php" }
//data.php
echo json_encode($dataArray);

(2) The naive approach will be to use code like next

setInterval(function(){
  list.clearAll();
  list.load("data.php");
}, 5000);

For more advanced solutions, check web-socket based solutions. For example http://docs.webix.com/desktop__server_faye.html

Thanks. I’wll try