The particularity of volist tag in thinkphp in Ajax operation

Source: Internet
Author: User
Implementing Volist tags in a thinkphp complex page (including volist) shows the return of jquery query results. This article introduces you to the particularity of the volist tag in the Ajax operation (recommended), thinkphp.

Background

Implement volist tags in a thinkphp complex page (including volist) to display the return of jquery query results

Knowledge points

The purpose of using AJAX is to not refresh the entire page without refreshing the partial table data, but note that the volist tag in the thinkphp framework is running on the server side, so the data obtained using JS dynamically cannot use the thinkphp tag, and cannot $this->ajaxReturn($data); Results are displayed directly using $("#p_id").HTML(data) the method.

Current solutions found (all defective)

1. Create a new page to display

Reopen a jump page and return the value using the $this->assign ("Volist_name", $data); Returned in the same way.

* * BUG: The equivalent of reloading the entire page and not meeting the need for a partial update form.

2. Do not display the label of the thinkphp frame

Do not use volist tags, the results of the Ajaxreturn returned analysis, according to their own JS template templates to display, you can implement the local form update

1,template templates<script id="events-template" type="x-tmpl-mustache"> {{#data}}

Summarize

The above is a small series to introduce you to the thinkphp in the volist tag in the Ajax operation of the particularity (recommended), I hope we have some help, if you have any questions please give me a message, small series will be in time to reply to you. Thank you very much for the support of PHP Chinese network!

Articles you may be interested in:

Explanation of the Volist label in thinkphp

PHP implementation of the link to find the list of links in the portal node knowledge of the explanation

PHP implementation can add watermark and generate thumbnail image processing Tool class _php tips

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.