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

后端 未结 5 428
轮回少年
轮回少年 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 16:20

    1. Check that $.ajax's datatype is set to jsonp

    2. Try to return {email:"ahsgah@ahsgh.com"}

提交回复
热议问题