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 an the external file
typestringoptional, type of data (xml,csv,json,jsarray), xml by default
callbackfunctionoptional, after loading callback function, can be omitted
promisea "promise" object

Example

// load dataview from an external file
myDataView.load("dataview.xml");
 
// load dataview, execute doAfterRefresh() function after dataview was loaded
myDataView.load("dataview.xml", doAfterRefresh);
 
// load dataview from an external csv file, 
// execute doAfterRefresh() function after dataview was loaded
myDataView.load("dataview.csv","csv", doAfterRefresh,);
 
// returns a "promise" object, see details
myDataView.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 Promix.js.

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