| Issue 293: | while reloading children of root node by ajax in json response, sometime multiple ajax call get created (due to users inpatience activtiy), nodes in tree get repeated. | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
I was using this to reload tree with some variable parameters on clicking button.
var rootNode = jQuery("#tree").dynatree("getRoot");
rootNode.removeChildren();
rootNode.appendAjax({ url: '/path/to/url',
data: { param1:'',param2:''}
});
But this was working perfect if user click button with patience
Otherwise clicking it rapidly create many ajax request and append set of nodes below previous set of nodes.
e.g.
- node1
- node2
- node3
- node1
- node2
- node3
What is the expected output? What do you see instead?
It should not create number of ajax request by aborting previous request.
What version of the dynatree and jQuery are you using?
jQuery 1.7.1 and dynatree 1.2.0
I have modified code of dynatree 1.2.0 for handling abort of ajax request.
also add this.xhr = null; in initialize (constructor)
if(this.xhr && this.xhr.readyState != 4){
this.xhr.abort();
}
this.xhr = $.ajax(options);
May 1, 2014
Project Member
#1
moo...@wwwendt.de
Status:
WontFix
May 2, 2014
Cleanup Scrumboard
Labels:
Milestone-Release2.0
|