Forum Moderators: open
If rowIndex = an increment of ten, meaning if it equals 10, 20, 80, 100 or even 10,550 it will equal 0. But the problem is that I am doing a search page all in JS. Now say there is 246 values in the array variable, it displays ten at a time, when you click next, it displays the next ten. Now you have finally gotten to 240. When you click next it will display the last six without error right? Wrong, it displays the last six but gives you an error saying " Array[...] is not an object " Now I have to find a way to where it checks and sees if it is at the last of the arrays. If it is, then display the last six.
Here's the code
if (rowIndex != to the last value in the array variable && rowIndex % 10 == 0) {
var round_ten = 9;
} else {
var round_ten = 0;
}
Thanks