Pagination: The "Back" button or the "Page 1" button not working after changing pages - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Pagination: The "Back" button or the "Page 1" button not working after changing pages (/showthread.php?tid=1500) |
Pagination: The "Back" button or the "Page 1" button not working after changing pages - Taylor - 03-15-2015 What I'm trying to do is create a pagination function. I have successfully created that. It works. The URI segment changes and everything. It's perfect. However, there is a small problem. When I press the "next" button or press another number to go to the next page, the "page 1" is still highlighted for some reason. I can't click it to go to the first page. The "Previous" button show up either. So after I go to a second page or any other page, other than 1, I cannot get back to the first page. The only way I can go back to the first page is by changing the URI segment. I couldn't find an answer to this specific question, so any help is highly appreciated. Thanks. My Model: PHP Code: public function record_count_sitelog() PHP Code: public function site_log() { PHP Code: <?php RE: Pagination: The "Back" button or the "Page 1" button not working after changing pages - mwhitney - 03-16-2015 It looks like your uri_segment setting may be wrong (shouldn't it be 5 instead of 4?). Also, you shouldn't use font tags in your HTML. They were deprecated in HTML4 16 years ago and aren't valid in HTML5. You can use a span and apply the color to the span in CSS, which would also make it easier to change later, if necessary. |