]> git.datanom.net - qtadmin.git/blame - js/forms.js
Add change row per page
[qtadmin.git] / js / forms.js
CommitLineData
24560f82
MR
1/* vim: set ts=4 tw=4 sw=4 noet: */
2
3function updateRowsPerPage() {
8b2ac33e
MR
4 var rowsPerPage = document.getElementById("rows");
5 var found = false;
24560f82
MR
6 var link = document.getElementsByTagName('a');
7 for (var i = 0; i < link.length; i++) {
8 var url = link[i].href;
67d5e2dd
MR
9 var pos = url.search('rowsperpage');
10 if (pos >= 0) {
8b2ac33e 11 found = true;
24560f82
MR
12 var base = url.slice(0, pos);
13 alert('base: ' + base);
14 }
15 }
8b2ac33e
MR
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 }
24560f82 22}
This page took 0.06239 seconds and 5 git commands to generate.