Click here to Skip to main content
15,748,930 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey guys,

How can I make ajax work with pagination? I dont have any codes right now but my problem is that the OFFSET value for my other pagination uses:

to identify how much data to OFFSET. But since ajax wont change the url of the page, it means I cannot use the uri->segment value anymore. Anyone know how to approach this?

karthik Udhayakumar 19-May-14 19:40pm    
You have complete confusion in the way of asking a question..pls use the improve quesion widget:)for better help
KatsuneShinsengumi 21-May-14 3:14am    
Nope I'm not confused in my question also I found a work around without using $this->uri->segment(3)'s value as an offset.

1 solution

I was able to make a work around:

(ThePageNo. -1)* the per_page value,.

Let's say I have 5 items per page
This way If I go to the third page,it means:
(3 -1)* 5 = 10.

So the offset will be 10, which will skip the first 10 rows in my table and then call the 11th to 15th data.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900