CodeIgniter Forums
Search Form Pagination Problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Search Form Pagination Problem (/showthread.php?tid=4872)



Search Form Pagination Problem - El Forum - 12-20-2007

[eluser]ccachor[/eluser]
Ok well, I'm having a tough time with pagination and post variables. I think the best thing to do is set the actual post parameters into the URI using javascript. Anyone done this?


Search Form Pagination Problem - El Forum - 12-20-2007

[eluser]tonanbarbarian[/eluser]
No I have not used javascript to do this
What I have done is written some code that stores the pagination information into the session and then retrieves that each time.
That way every time I come back to a paginated page it is on the same page as I left it.
This then allows me to have filters or sorting etc on the form but still have the pagination work.
Then of course I also store the filters and sorting options in the session as well as that they are reapplied each time too.