Best way to integrate searching with pagination

Posted by Vijay Choudhary on Stack Overflow See other posts from Stack Overflow or by Vijay Choudhary
Published on 2012-11-17T04:52:31Z Indexed on 2012/11/17 5:00 UTC
Read the original article Hit count: 137

Filed under:

I have a web application build on cakephp 2.x.

I have integrated pagination on my data.

Now i want to implement searching on that data also, and pagination should work according to search result.

Now my question is:

  1. Should i use a form to post my search string. If so, then which method should i use, GET or POST.

  2. OR, should i use javascript window.location method, and append the search string to it. If we use this method then search string can append more than once to url.

  3. Or any other best way to implement this.

Can anybody give the best solution for this as it is a common task for each application to have.

© Stack Overflow or respective owner

Related posts about cakephp-2.0