Implementing Volist tags in a thinkphp complex page (including volist) shows the return of jquery query results. This article mainly and everyone introduces thinkphp in the volist tag in the Ajax operation of the particularity (recommended), need to refer to the friend, hope to help everyone.
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 be $this Ajaxreturn ($data); The result is directly with $ ("#p_id"). The HTML (data) method is displayed.
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 template <script id= "events-template" type= "X-tmpl-mustache" > {{#data}}