sorry, I'm a bit of an idiot. but just to confirm,...
# javascript
m
sorry, I'm a bit of an idiot. but just to confirm, pagesize would be the total amount of result that you want on one page, correct?
g
Yes. range takes a record number start and end from the data base query result. So if you want 15 records per page pagesize = 15.
m
okay perfect, is there any way i can get this to work if i wanted the first page=1 instead of 0?
not really, right?
g
Simply sub 1 from the page number you show.
My display has 1,2,3,4 but the actual page I send to my routine is 0,1,2,3 for the formula above to work.
The end result is you want .range(0,14) for first page of 15 and .range(15,29) for second, etc.
m
okay, perfect thank you very much!