hi,
i am using ajax for showing result in a page. how can i use pagination on these pages. i am using prev and next link.
this is the code:
<a href="index.php?pagenum=<?php echo $prev;?>"> << PREV >></a> <a href="index.php?pagenum=<?php echo $next;?>"> << NEXT >> </a>
</div>
i am sending each result pages on the index pages through ajax. i have written the above code for it. but the result and not changing. It menas i m not redirection the page properly. can anyone give me solution how to redirect to the ajax pages.
thanks
How to use pagination in pages that are coming through ajax?
Moderator: General Moderators
-
RishikeshJha
- Forum Newbie
- Posts: 11
- Joined: Tue Mar 31, 2009 1:54 am
Re: How to use pagination in pages that are coming through ajax?
I was able to achieve this.. like this is how it goes:
1. client clicks on the next page.
2. the current page will be sent to the server via ajax
3. the server will query the next page based from the given current page received.
4. the server updates the NEW PAGE
5. the server will return the queried results PLUS the NEW PAGE
6. the client now receives the queried results PLUS the NEW PAGE
7. client now will replace its current page to the NEW PAGE.
8. then go back to step number 1 again.
taadddaaaaa.... there it is.
1. client clicks on the next page.
2. the current page will be sent to the server via ajax
3. the server will query the next page based from the given current page received.
4. the server updates the NEW PAGE
5. the server will return the queried results PLUS the NEW PAGE
6. the client now receives the queried results PLUS the NEW PAGE
7. client now will replace its current page to the NEW PAGE.
8. then go back to step number 1 again.
taadddaaaaa.... there it is.