Jump to content

Items per page in links, not in selectbox


Recommended Posts

You need to create a form <input type="hidden" name="n" id="nb_item" value="10" /> instead of selectBox

links of the following form:

 

<a href="javascript:void(0)" onclick="changeNbItem(20)"> 20 items per page </ a>

<a href="javascript:void(0)" onclick="changeNbItem(30)"> 30 items per page </ a>

 

Besides you need to place the following JS-code on the page:

<script>

function changeNbItem (count) {

$ ('# nb_item'). val (count);

$ ('form.nbrItemPage'). submit ()

}

</ script>

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...