paging on popup - 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: paging on popup (/showthread.php?tid=64572) |
paging on popup - rchiu5hk - 03-05-2016 Dear all, I have below code to show popup. Code: echo "<div class=\"user-ads-action\"><a href=\"#sellerApprovePopup\" data-toggle=\"modal\" data-id=\"$postID\" data-pagenum=\"$pageNum\" class=\"btn btn-default btn-block directSendButton\"> <i class=\" icon-pencil\"></i> Approve Request </a></div>"; And I have paging on popup, how to handle the paging? I really do not have idea as it needs to refresh the content and show popup. Code: div class="modal fade" id="sellerApprovePopup" tabindex="-1" role="dialog"> RE: paging on popup - Wouter60 - 03-06-2016 If you don't want the page to be refreshed, you have 2 options. 1. Load all records in hidden divs, and make the one that is the current record, visible. You will need jQuery for that, but then again: what's a website without jQuery nowadays? 2. Use AJAX to refresh the contents of the div in your pop-up only. In that case, jQuery also makes life much easier, since it has a few powerful functions to make AJAX requests. From the AJAX function in your view, you call the controller/method that returns the new data. And jQuery takes care of updating the DOM (i.e. the HTML-document). |