When you flip the page, only the data in the specified DIV in the page is refreshed, while other div on the page does not move .... there is a requirement that only the data in the specified DIV in the page is refreshed during page turning, while the other p on the page does not move .... urgent, online ............ in addition, I flip pages like this
HomepageWill refresh the whole page
Reply to discussion (solution)
The best way to avoid refreshing the entire page is to use ajax.
Click the Flip button and use ajax to submit the query conditions and selected page numbers to PHP and PHP for query. after combining the results, return to the front-end JS, process the returned data, and replace the specified DIV.
The best way to avoid refreshing the entire page is to use ajax.
Click the Flip button and use ajax to submit the query conditions and selected page numbers to PHP and PHP for query. after combining the results, return to the front-end JS, process the returned data, and replace the specified DIV.
I do it with my projects, and there are two pages in a template, while my paging data is in the common. func. the value returned by the function written in php in the template .... according to my requirements, how should I write ajax without refreshing pages .... it is best to paste the code for your own research...
My paging data is the value returned by the function written in common. func. php in the template.
Is the returned html rendered? It is better to get this html and insert it directly to the corresponding location.
My paging data is the value returned by the function written in common. func. php in the template.
Is the returned html rendered? It is better to get this html and insert it directly to the corresponding location.
Html is returned.
Jq can be easily used
$(function() { $('a').click(function(){ $('#test').load(this.href) return false; });});
In this way, the original jump is changed to a partial refresh.
Test is the id of the p you need to refresh locally.
Of course, you will find that the entire page is displayed in p, so you need to modify the target program and let it return the required content.
If you want to refresh it, use ajax and use asynchronous refresh.
Use ajax .. Next page
Script
Function pageNext (Id)
{
....
Ajax. call ("page. php? Page = "+ Id, resPagedo, 'post', 'json ');
}
Function resPagedo (result)
{
Add data to p.
}
Script
... This process is probably the case.
There is a requirement that only the data in the specified DIV in the page is refreshed during page turning, while the other p on the page does not move .... urgent, online ............ in addition, I flip pages like this
HomepageWill refresh the whole page
I remember that I could use iframe to do it. if you set an iframe for the refresh, the area will only be refreshed when paging !!! Try it.
Ajax is preferred, but it can also be placed in iframe, but ajax is still needed.