]> git.datanom.net - qtadmin.git/blame_incremental - js/forms.js
Add change row per page
[qtadmin.git] / js / forms.js
... / ...
CommitLineData
1/* vim: set ts=4 tw=4 sw=4 noet: */
2
3function updateRowsPerPage() {
4 var rowsPerPage = document.getElementById("rows");
5 var found = false;
6 var link = document.getElementsByTagName('a');
7 for (var i = 0; i < link.length; i++) {
8 var url = link[i].href;
9 var pos = url.search('rowsperpage');
10 if (pos >= 0) {
11 found = true;
12 var base = url.slice(0, pos);
13 alert('base: ' + base);
14 }
15 }
16 if (found == false) {
17 /* current page has rows < current rows per page */
18 var href = location.href;
19 href = href + '?rowsperpage=' + rowsPerPage.value;
20 location.href = href;
21 }
22}
This page took 0.026441 seconds and 5 git commands to generate.