- /* current page has rows < current rows per page */
- var href = location.href;
- href = encodeURI('index.php?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;