javascript - Backbone.js : No Network scenario - options.error not triggered -


i have page developed using backbone, handlebar , _.js. while fetching model (as normal http jsonp callback request), set options.error , options.success. success callback gets called properly. however, simulate network down scenario, when disable network adapter in pc (from control panel) , trigger call again, error callback not getting called.

could please suggest if doing wrong?

thanks , best regards, v. vasanth

need @ code find out what's problem. if put callbacks fetch method should right:

model.fetch({     success:function()     {     },     error:function()     {     } }); 

if override model sync method this:

sync:function(method, model, options) {     $.ajax({         url:"your_url",         // other configs         success:function(data)         {             options.success(data);         }         error:function()         {             options.error();         }      }) } 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -