I am having a client table in the database containing records of more than 100 clients. Using Ajax I had populated the <table> for the first 12 clients. Now what I am trying to do is
1. I provided two navigation button i.e Next and Previous
2. On clicking the Next button I should the next 12 clients from the database and the page does not have to get refreshed.
3. If Next is done then the same logic will apply for the Previous case but with slight modification.
Note:- I had taken only one td and using for loop i created 12 and id of the td's are assigned dynamically from the client table and equals to client id.
The logic I am working on it is
1. Get hold of the first and the last td, so by doing this, we get the start and end position of the next set of 12 clients
2. The next start position will be end+1 and the end position will be start+12
But here the question is how can I get hold of the tds. I cant use td's id attribute as those are generated dynamically and equals client's id.
If you people have better logic than this please tell me