title: How to set up flexible pagination for tables in Javascript?
body: <p>I am a relative JavaScript beginner. I am comfortable working with documents (<code>document.getElementById(...)</code> and <code>document.getElementsByTagName(...)</code>.. and other document querying functions.</p>
  
  <p>I have been asked to create some sort of a table pagination library for my team. We don't use jQuery or any other third party libraries. So I would have manipulate the table dom or something like that to make it work. In this library, I would have to be able to</p>
  
  <ol>
  <li>set up flexible pagination (Number of rows to be displayed per page may be configured by using some sort of a text box) I took a look at some of the sources <a href="https://stackoverflow.com/questions/1523163/jquery-pagination-plugin/1523265#1523265">jQuery Pagination Plugin</a>. But I can not understand it.</li>
  <li>The user should be able to navigate back and forth using some icons. The page number changed should be reflected in the configuration box.</li>
  </ol>
  
  <p>I am not asking for solutions because I would learn to do this on my own. How can I start working on this issue?</p>
  
  <h2>Update after observations from nnnn</h2>
  
  <p>I am not sure what approach to take, as I had not considered that possibility. Most of the times, we have only about 2000 records to display. I guess if the load does not take too much memory, I would prefer to load before hand and then try to paginate it. Although, I will go with whatever is recommended.</p>