Check documentation for the latest version of dhtmlxSuite load DHTMLX Docs

load

loads data from an external file (xml, json, jsarray, csv)

promise load(string url, [string type,function callback] );
urlstringan URL to an external file
typestringoptional, the type of data (xml,csv,json,jsarray), xml by default
callbackfunctionoptional, an after loading callback function, can be omitted
promisea "promise" object

Example

// load list from an external file
myList.load("list.xml");
 
// load list, execute doAfterRefresh() function after list was loaded
myList.load("list.xml",doAfterRefresh);
 
// load list from an external csv file, 
// execute doAfterRefresh() function after list was loaded
myList.load("list.csv","csv",doAfterRefresh);
 
// returns a "promise" object, see details
myList.load(url).then(function(text){
    // text - a server-side response
});

Details

DHTMLX is integrated with Promiz.js library to treat the result of asynchronous operations (like data loading) without callbacks. Read more about integration of DHTMLX with Promiz.js.

Change log
  • integration with Promiz.js is added in the version 5.1
Back to top