I'm using following ajax code:
$.ajax({
type: "POST",
url: "/home/ajax/graph/"+ atr,
dataType: "html",
data:{
group_id : '{{groupid}}',
csrfmiddlewaretoken: '{{ csrf_token }}',
node_id : atr
},
success: function(result) {
$("#info").html(result);
},
complete: function(){ }
});
the url and view are working properly. The data goes till the last template by the help of redirection from view file.
view code :
def adminRenderConceptGraph(request,group_id,node_id=None):
if request.is_ajax() and request.method == "POST":
group_name = u'home'
if node_id:
req_node = node_collection.one({'_id':ObjectId(node_id)})
template = 'ndf/graph_concept.html'
variable = RequestContext(request, {'node':req_node })
return render_to_response(template,variable)
its corresponding url is:url(r'^graph/(?P<node_id>[^/]+)$', 'adminRenderConceptGraph', name='adminRenderConceptGraph'),
It's suppose to display a graph in the overlay. The data reaches the graph template in the overlay and this is the warning shown in the console. The screen just freezes.
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.