How to execute somegrid.loadXML asynchronously?

I’m maintaining jquery+dhtmlx code, and author used to load .xml content to a dhtmlx grid with the following way:

somegrid.loadXML ("url", function () { ... } );

I put

calls everywhere and I noticed that the execution is passed to

immediately and the content of the callback function is executed after that. I don’t have problem with this asynchronous approach, but I’m receiving error:

Unable to get property '_childIndexes' of undefined or null reference

and I suspect, that the error is beacause of that. But how to make this function call as synchronous?


Please, try to call your additional code in the callback functiion:
somegrid.loadXML (“url”, function () {
} );

Actually, there’s no “additional_code” in the source… But I’m receiving the DHTMLX error. And I think the reason is that execution is still inside of the callback function, and DHTMLX suppose a state that is not already reached…

anyway, loadXML() is already deprecated?

and we cannot call load() synchronously?

anyway, loadXML() is already deprecated?
yes, loadXML() method is deprecated now.
Actually load() method is similar to the loadXML() but allows to load not only from the xml.

and we cannot call load() synchronously?
yes, it also right.

If the problem still occurs for you pleas,e provide with any kind of sample of your using code so I can suggest a solution.