DHTMLX Docs & Samples Explorer

load (url, type, callback)

Loads data from a remote url.

data.load("data.xml");
data.load("data.xml",function(){
    //callback
});
 //or
data.load("data.xml","xml");
data.load("data.json","json");
 //or 
data.load("data.xml","xml",function(){
    //callback
});

Parameters:

  • url - the data url (needs to be in the same domain)
  • callback - the callback function
  • type - the type of data
    • “xml”
    • “html”
    • “json”
    • “jsarray”
    • “csv”

Description:

  • A callback function is always the last parameter.
  • The method is async., so you need to use a callback function to catch the moment when data is really loaded in the DataStore.