jQuery.ajax() vs. loadXML
Hi,
I have the following code:
- myGrid.loadXML (myUrl, function () {
- console.log (myGrid.getRowsNum ());
- });
and it is working well (I will see the number of rows of the grid on the console). But I replaced the following code with this:
- $.ajax({
- type: "POST",
- url: myUrl,
- dataType: "text",
- success: function(result) {
- myGrid.parse(result);
- console.log (myGrid.getRowsNum ());
- }
- });
and the result is 0. Why? Function parse() should be synchronous, according to this
page.