Zergman Posted November 30, 2010 Share Posted November 30, 2010 Wasn't sure where to post this but this is an issue with CodeIgniter Pagination. I have a big search form. I enter search criteria and it works and returns my results along with working Pagination. Problem is when I click on a pagination link, the page reloads but it submits an open query with no criteria so it searches all records and the pagination breaks. Solution i'm trying to impliment is to have a hidden form that stores the search criteria so when a pagination link is clicked, it submits the hidden form. Problem i'm having is making the pagination links submit the hidden form. I'm trying to wrap it with a div tag and add an onclick to it but it isn't working. How would I do this? Quote Link to comment Share on other sites More sharing options...
Zergman Posted November 30, 2010 Author Share Posted November 30, 2010 Well got the div submitting <div onclick="document.form_hidden.submit();"><?php echo $this->pagination->create_links(); ?></div> but it's not submitting the form when the pagination links are clicked. If I add something else in the div it works when TestTestTestTest is clicked. <div onclick="document.form_hidden.submit();">TestTestTestTest<?php echo $this->pagination->create_links(); ?></div> Arg.... Quote Link to comment Share on other sites More sharing options...
Lautarox Posted December 5, 2010 Share Posted December 5, 2010 You might have to work with the size of the div with css. You could modify the pagination class, but the wrapping may work, try giving it a size. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.