]>
Commit | Line | Data |
---|---|---|
1 | /* vim: set ts=4 tw=4 sw=4 noet: */ | |
2 | ||
3 | function 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 | } |