javascript - RedirectToAction in Ajax call blocks other calls -
i sending ajax call kendo treeview partial view, partial view located controller named "commoncontroller" , requires configdata kendo treeview partial send using tempdata. action method in commoncontroller returns kendo tree partial view. bellow code:
ajax call controller
$.ajax({ url: deploymentdirsim + "/formjs/foldersandfilestreepartialview", type: "get", contenttype: "'application/json; charset=utf-8'", success: function(sdata) { $("#fftreeviewdiv").html(sdata); }, error: function(e) { console.log(e); } });
controller method
public actionresult foldersandfilestreepartialview() { foldersandfilestreeconfigdata configdata = new foldersandfilestreeconfigdata { name = "treeviewfolderfile", htmlattributes = "height:100%; overflow:hidden;", checkboxes = false, showcheckboxonfolder = false, ondatabound = "onfolderexploreritemdatabound", onselect = "onfolderexplorertreeviewitemselect", onrequestend = "", oncheckboxcheck = "", onexpand = "onfolderexploreritemexpand", oncollapse = "onfolderexploreritemcollapse", actionname = "populatefoldersandfilestree", controllername = "formjs", areaname = "myarea" }; tempdata[configdata.name] = configdata; return redirecttoaction("foldersandfiletreeview", "common", new { area = "", tempdatakey = configdata.name }); }
commoncontroller code
public actionresult foldersandfiletreeview(string tempdatakey) { viewbag.configdata = tempdata[tempdatakey]; return partialview(); }
it's working fine in circumstances due reason (eg. network delay) "foldersandfiletreeview" partial view return delay, problem until , unless partial request in progress remaining calls such scripts, stylesheet , image files downloads stuck , status goes pending. bellow snapshot of network trace:
and due above problem ui become stuck while.
kindly please suggest me regarding issue. doing wrong? want these calls run asynchronously , not block other calls?
thanks in advance
Comments
Post a Comment