jQuery ajax:error runs even if the response is OK 200

后端 未结 5 458
轮回少年
轮回少年 2021-01-17 15:21

I have a form which submit a form via AJAX with :remote => true. Looking at the server log and FireBug, I get the response 200 OK and it returns JSON in the form of:

5条回答
  •  自闭症患者
    2021-01-17 15:58

    Use ajaxSuccess instead of ajax:success, and ajaxError instead of ajax:error for your eventTypes.

    See here: http://docs.jquery.com/Ajax_Events

提交回复
热议问题