loads values from external datasource
Method load can be used with different count of parameters
By default used type will be set to json
comp.load("some/path/data.json");
The same with callback will look as
comp.load("some/path/data.json", function(text, xml, http_request){ //do something });
And if you need to specify the loading type, above examples will look as
comp.load("some/path/data.xml", "xml");
or
comp.load("some/path/data.xml", "xml", function(){ //do something });
By default the loading is async., so you will need to use callback, to trigger some action after data loading.
Callback method provides 3 parameters
While load doesn't provide direct ability to use post and sync, it can be done by using parse API
//sync data loading var result = dhx.ajax().sync().get("some.json"); comp.parse(result.responseText);
//using POST for data loading var result = dhx.ajax().post("mydata.php", "some=value", function(text){ comp.parse(text); });