Only the data in the div specified in the page is refreshed while the page is being paged, and the other div is not moving ....

Source: Internet
Author: User
There is a requirement that you only refresh the data in the div specified in the page when you turn the page, and the other div does not move .... Urgent, online, etc.... In addition, I turn pages like this
  • Home
  • The entire page will still be refreshed.


    Reply to discussion (solution)

    The best way to not refresh the entire page is to use Ajax

    Click the page Turn button, using AJAX to submit the query criteria and the selected page number to the php,php query, the combination of results back to the foreground JS foreground JS processing returned data after the replacement of the specified Div

    The best way to not refresh the entire page is to use Ajax

    Click the page Turn button, using AJAX to submit the query criteria and the selected page number to the php,php query, the combination of results back to the foreground JS foreground JS processing returned data after the replacement of the specified Div
    I do it with a dream-weaving thing, there are two pages in a template, and my paging data is the value of the function returned in the common.func.php that is written in the template .... How should I write Ajax without refresh paging according to my needs .... It's best to put some code on your own.

    And my paging data is the function that is written in common.func.php returns the value in the template

    Does it mean that the rendered HTML is returned? That's better, get this HTML directly into the corresponding location

    And my paging data is the function that is written in common.func.php returns the value in the template

    Does it mean that the rendered HTML is returned? That's better, get this HTML directly into the corresponding location
    Yes, the return is HTML.

    It is easy to complete with JQ

    $ (function () {  $ (' a '). Click (function () {    $ (' #test '). Load (This.href)    return false;  });

    This turns the original jump into a partial refresh.
    Test is the ID of the div you need to partially refresh

    Of course you will find that the DIV shows the whole page, so you need to modify the target program so that he can return the desired content.

    If you don't refresh, use Ajax, asynchronous flush

    With Ajax. Next page


    ....... This is probably the process.

    There is a requirement that you only refresh the data in the div specified in the page when you turn the page, and the other div does not move .... Urgent, online, etc.... In addition, I turn pages like this

  • Home
  • The entire page will still be refreshed.
    I remember as if you can do with the IFRAME, you have to refresh the place to do an IFRAME, paging will only refresh the area!!! You can try.

    Ajax is preferred, but can also be placed in an IFRAME, but still use Ajax.

  • 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.