The Ajax button loaded by yii-Ajax is invalid.

Source: Internet
Author: User
  1. Controller, partial rendering view method, the two parameters below are often omitted

    $ This-> renderpartial ('taskactions', array ('taskaction' => $ taskaction, 'task' => $ task,), false, true );
  2. The Ajax OPERATION button loaded with Ajax is invalid in the project development today. The following figure shows the normal page for comparison.
  3. Error Page: triggers ajax to load files
  4. Normal page: triggers ajax to load files
  5. The comparison shows that the jquery file is missing when loading the error page. Therefore, manually reload the jquery file, but it still does not work.
  6. At last, we found that the default parameters are missing during rendering. $ processoutput and $ processoutput can solve the problem.
  7. Processoutput process output. Otherwise, only the rendering result is output. The JS file generated will be filtered out.

 

Related Article

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.