I have the same problem, but only in a specific environment. I am wondering if your problem will be the same. My environment:
- Starting the internal Django web server (./manage.py runningerver 0.0.0.0:8080)
- View my site in Google Chrome (v4.1.249.1025).
In these circumstances, the following jQuery code yields data = null, status = "success" in about half the time. The other half of the time when it returns a valid object for data.
$.ajax({ type:"POST", url:"response/"+q.id+"/", cache:false, dataType:"json", data:{response:$(this).val()}, success:function(data, status) { alert(data+","+status); }, error:function() { $(".main_container").text("Error. Please check your internet connection."); } });
Aaron source share