X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/796fb317fdfe7db9f3f267a8c8f98b0b11c222ce..bf88ea6d8acb7f42c3a7c9db5f69706cb0a23912:/js/forms.js diff --git a/js/forms.js b/js/forms.js index 2d7c360..2ae03c8 100644 --- a/js/forms.js +++ b/js/forms.js @@ -2,6 +2,7 @@ function updateRowsPerPage() { var rowsPerPage = document.getElementById("rows"); + var form = document.getElementById("rowsForm"); var found = false; var link = document.getElementsByTagName('a'); for (var i = 0; i < link.length; i++) { @@ -16,8 +17,10 @@ function updateRowsPerPage() { } if (found == false) { /* current page has rows < current rows per page */ - var href = 'index.php?page=1&rowsperpage=' + rowsPerPage.value; + var href = location.href + '?rowsperpage=' + rowsPerPage.value; alert(href); - window.open(href, '_self'); + form.action = href; + form.submit(); } + return false; }