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