jquery - Backbone model.save() reports error in chrome -


information:

  • backbone version: 1.0.0
  • jquery version: v1.10.2
  • chrome version 29.0.1547.65
  • running site locally using apache server

i creating simple app learn how use backbone creates todo list (following jeffery way's 'connected backbone' tutorials). have implemented restful api using laravel 4 put when try save model (tasks in case) using tasks.save() chrome reports error in jquery on line 8706.

when check database record has indeed been updated success function not fire, when run same code in safari fine.

task.save(null, {success:function(){console.log('item saved database')}}); 

so question is: bug or should have set before hand.

(i have seen similar questions see none people stating jquery return error)

edit: error getting

get http://localhost:8888/todo/public/tasks/1  jquery.js:8706   - send jquery.js:8706 jquery.extend.ajax jquery.js:8136   - backbone.ajax backbone.js:1202   - backbone.sync backbone.js:1185  - _.extend.sync backbone.js:289  - _.extend.save backbone.js:492   - (anonymous function)   - injectedscript._evaluateon  - injectedscript._evaluateandwrap  - injectedscript.evaluate 

edit: ok feel stupid, set laravel using way/generator , used scaffolding returns views , not models. once edited controllers update function return model , not view chrome happy, weird though safari did not have problem though , happy accept model updated success

(bit new stack overflow should leave question here or should remove it?)

ok feel stupid, set laravel using way/generator , used scaffolding returns views , not models. once edited controllers update function return model , not view chrome happy, weird though safari did not have problem though , happy accept model updated success


Comments

Popular posts from this blog

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

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

javascript - storing input from prompt in array and displaying the array -