Jquery ajax does not execute the success method after returning json results from the background. jqueryjson

Source: Internet
Author: User

Jquery ajax does not execute the success method after returning json results from the background. jqueryjson
During the development process, users often use asynchronous mode to interact with the background. The results returned from the background to the foreground are often in the json string format, if there is a problem with the returned result string (json) in the background (the json format is incorrect ). The js Code at the front end of ajax will directly call the method in error, and the success method will not be used at this time. Here, you can go to an online json verification website to check whether your json string is correct. If it is a json string generated using the json toolkit, there is no problem.

Why is success not executed when ajax is used to receive json data returned in the background?

First, specify the text data to be returned to see if it can be obtained normally.
Change to json,
If not, the format is incorrect.

Action response ajax return json type cannot be executed success

Writer does not have flush

In addition, use the debugging tool of IE8 or chrome to check the error message.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.