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