- /* current page has rows < current rows per page */
- var href = location.href;
- href = 'index.php?rowsperpage=' + rowsPerPage.value;
- alert(href);
- window.location = href;
+ href = location.href + '?rowsperpage=' + rowsPerPage.value;
+ } else {
+ pos = location.href.search('rowsperpage');
+ base = location.href.slice(0, pos);
+ href = base + 'rowsperpage=' + rowsPerPage.value;