[SOLVED] list.load() does not work with function() parameter

hello,

i have tried a lot of my own and asking google for help but i cant find any solution for my issue.
if i try to use the function parameter of list.load(url, function, datatype) like it is described here: docs.dhtmlx.com/api__dataloading_load.html. i allways get a syntax error in line 1:1 which is the doctype. i also tried the other possible variation mentioned on the side above. the only working method is list.load(url, datatype).
to be more accurate, the function parameter itself is working. the alert(“foo”) gets fired, but nothing is loaded to the list.
i’m using the current build of dhtmlx std lib.

[code]

html, body {width: 100%;height: 100%;margin: 0px;overflow: hidden;}


[/code]

i really need to have the possibility to use the function parameter of load().
btw, the autodetection of datatype (json/xml) does not work either, it allways tries to load a xml.

thank you for your help.
halanson

Hello,

The default datatype is xml. json data require setting “json” as the second parameter:

docs.dhtmlx.com/list__data_loading.html

so i’m unable to call a callback function for list.load() with json as datatype?

docs.dhtmlx.com/list__data_loading.html

solved

for some reasons the order of the list.load() parameters is different from all the other component.load() functions.

docs.dhtmlx.com/list__data_loading.html

but it has to be

myList.load(url, datatype, function(){ alert("data is really loaded"); // any operations with data can be placed here });